ocaml-ai-sdk.ai_provider
Ai_provider.Language_model
Core abstraction for AI language models.
This is the OCaml equivalent of Vercel AI SDK's LanguageModelV3. Each provider implements this signature.
LanguageModelV3
ocaml-ai-sdk.ai_core
ocaml-ai-sdk.ai_provider_anthropic
ocaml-ai-sdk.ai_provider_openai
module type S = sig ... end
The module type that every provider must implement.
type t = (module S)
First-class module wrapper for runtime dispatch.
val generate : t -> Call_options.t -> Generate_result.t Lwt.t
val stream : t -> Call_options.t -> Stream_result.t Lwt.t
val provider : t -> string
val model_id : t -> string
val specification_version : t -> string