Skip to content

AnthropicAdapter ​

Category: Providers

Source: anthropic_adapter.dart

Adapter that talks to the Anthropic Messages API via [AnthropicClient].

Classes ​

AnthropicAdapter ​

Constructor ​

dart
AnthropicAdapter({
    this._requestClientFactory,
    this.promptCacheEnabled = true,
  })

Properties ​

PropertyTypeDescription
promptCacheEnabledboolWhen true, the [AnthropicClient]s this adapter creates send the top-level cache_control: {type: "ephemeral"} directive that engages auto-caching. See [GlueConfig.anthropicPromptCache] for the resolution path.
adapterIdString get
adapterIdString get

Methods ​

`LlmClient createClient({ ​
required ResolvedProvider provider,
required ResolvedModel model,
required String systemPrompt,

})`

Released under the MIT License.