Package: @effect/ai
Module: LanguageModel
Utility type that extracts the context requirements from LanguageModel options.
Automatically infers the required services based on the toolkit configuration.
Signature
type ExtractContext<Options> = Options extends {
readonly toolkit: Toolkit.WithHandler<infer _Tools>
} ? Tool.Requirements<_Tools[keyof _Tools]>
: Options extends {
readonly toolkit: Effect.Effect<Toolkit.WithHandler<infer _Tools>, infer _E, infer _R>
} ? Tool.Requirements<_Tools[keyof _Tools]> | _R
: never
Since v1.0.0