| 26 | * @since 4.0.0 |
| 27 | */ |
| 28 | export class OpenRouterConfig extends Context.Service< |
| 29 | OpenRouterConfig, |
| 30 | OpenRouterConfig.Service |
| 31 | >()("@effect/ai-openrouter/OpenRouterConfig") { |
| 32 | /** |
| 33 | * Gets the configured OpenRouter service from the current context when present. |
| 34 | * |
| 35 | * @since 4.0.0 |
| 36 | */ |
| 37 | static readonly getOrUndefined: Effect.Effect<typeof OpenRouterConfig.Service | undefined> = Effect.map( |
| 38 | Effect.context<never>(), |
| 39 | Context.getOrUndefined(OpenRouterConfig) |
| 40 | ) |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Types associated with the `OpenRouterConfig` context service. |