package ocaml-ai-sdk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=17063971a74ccd72619a43ecfcb29d28cdf08f90d406a960bd475f65fee1a0d9
sha512=1f3f2d1d7fa4f53843cc1b303cbf9d6dcc85780e7c768ced723f3de83ea897748fa231b48e729216abcc069dee818edc6751a45271541e8a007369bf6e9d23e3
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.