GenerativeConfig class final

Configuration for the generative media resolver: provider credentials, the on-disk cacheDir, an offline switch, and an optional maxGenerations budget.

Build it explicitly (server, on-device secure storage, tests) or from the environment with GenerativeConfig.fromEnv. Credentials are never logged or committed; the cacheDir holds the produced assets, keyed by prompt + seed + params, and is safe to commit so CI and teammates reuse them.

Annotations

Constructors

GenerativeConfig({Map<ProviderId, ProviderCredentials> credentials = const {}, String? cacheDir, bool offline = false, int? maxGenerations})
Creates a config over credentials, an optional cacheDir (defaults to .fluvie/generative under the working directory), an offline switch, and an optional maxGenerations budget per render.
const
GenerativeConfig.fromEnv(Map<String, String> env)
Reads provider API keys and settings from env.
factory

Properties

cacheDir String?
Where produced assets are cached, or null for the default.
final
credentials Map<ProviderId, ProviderCredentials>
The API credentials per provider.
final
hashCode int
The hash code for this object.
no setterinherited
maxGenerations int?
The most assets a single render may generate (cache hits do not count), or null for no limit.
final
offline bool
When true, only cached assets are served; a miss is an error (so CI never silently calls a paid API).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited