Class AnthropicProvider
- Namespace
- IntentSharp.Providers
- Assembly
- IntentSharp.dll
Anthropic Messages API provider. Supports JSON-schema structured output through output_config.format.
Anthropic does not offer an embeddings endpoint, so SupportsEmbeddings is false.
public sealed class AnthropicProvider : HttpProviderBase, IAIProvider, IDisposable
- Inheritance
-
objectAnthropicProvider
- Implements
-
IDisposable
- Inherited Members
-
object.Equals(object)object.Equals(object, object)object.GetHashCode()object.GetType()object.ReferenceEquals(object, object)object.ToString()
- Extension Methods
Constructors
- AnthropicProvider(HttpProviderSettings, HttpClient?, ILogger?)
Creates the provider from full settings.
- AnthropicProvider(string, string?, HttpClient?, ILogger?)
Creates the provider with an API key and the default settings.
Fields
- DefaultModelId
The model used when none is given to the constructor.
Properties
- Name
Always "Anthropic".
- SendTemperature
Current Claude models reject sampling parameters (temperature) with HTTP 400. Set to true only for older models that still accept them.
- SupportsEmbeddings
Always false: Anthropic has no embeddings endpoint.
Methods
- Authenticate(HttpRequestMessage)
Adds provider authentication headers to an outgoing request.
- CompleteAsync(AIRequest, CancellationToken)
Sends the request to the Messages API and returns the reply's text. The request's temperature is sent only when SendTemperature is true.
- EmbedAsync(string, CancellationToken)
Always throws: Anthropic has no embeddings endpoint. Use another provider, such as OpenAI, for embeddings.