package ocaml-ai-sdk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4f3f22ae61d360b994cd75323bcb6b6bf915f6755fd1e7bab6844ca8a240c1e7
sha512=3c52b17096da818f5d3bcf9fe16826c3bec4533d6a1681e8ba0f957f37ee4f425696017cb78f1a24732f8851010d436cf446f873b72b6a4f5004d6b492072abf
doc/ocaml-ai-sdk.ai_provider_anthropic/Ai_provider_anthropic/index.html
Module Ai_provider_anthropicSource
Anthropic provider for the OCaml AI SDK.
Implements the Anthropic Messages API for Claude models.
val create :
?api_key:string ->
?base_url:string ->
?headers:(string * string) list ->
unit ->
Ai_provider.Provider.tCreate an Anthropic provider factory. api_key defaults to ANTHROPIC_API_KEY env var.
val language_model :
?api_key:string ->
?base_url:string ->
?headers:(string * string) list ->
model:string ->
unit ->
Ai_provider.Language_model.tCreate a language model with explicit configuration.
Convenience: create a model using ANTHROPIC_API_KEY env var and default base URL.
Re-exported modules
Known Anthropic models with capabilities metadata.
Prompt caching control for Anthropic models.
Anthropic-specific provider options.
Per-content-part cache control via Provider_options.
Convert SDK prompts to Anthropic Messages API format.
Convert SDK tools and tool choice to Anthropic format.
Convert Anthropic API responses to SDK format.
Convert Anthropic usage to SDK format.
Anthropic API error types and parsing.
Transform Anthropic SSE events into SDK stream parts.
Manage Anthropic beta feature headers.
HTTP client for the Anthropic Messages API.
Anthropic model implementing Ai_provider.Language_model.S.