Package: @effect/ai
Module: Model
A Model represents a provider-specific AI service.
A Model can be used directly as a Layer to provide a particular model implementation to an Effect program.
A Model can also be used as an Effect to “lift” dependencies of the Model constructor into the parent Effect. This is particularly useful when you want to use a Model from within an Effect service.
Signature
export interface Model<in out Provider, in out Provides, in out Requires>
extends
Layer.Layer<Provides | ProviderName, never, Requires>,
Effect.Effect<Layer.Layer<Provides | ProviderName>, never, Requires>
{
readonly [TypeId]: TypeId
/**
* The provider identifier (e.g., "openai", "anthropic", "amazon-bedrock").
*/
readonly provider: Provider
}
Since v1.0.0