package ocaml-ai-sdk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=636d458cb1564ed88ca8c0250c432e91c2f822fd49ad2b923819e762bda10be6
sha512=361e476423ebc0f9cf561cc28ccd4531cf08e424e95eea43a67d6b8dbb457a49a25b418625ffa99f6327fc5df14e540e502d1aa8ed606111c5c010fe498eec2a
doc/ocaml-ai-sdk.ai_provider/Ai_provider/index.html
Module Ai_providerSource
OCaml AI SDK — Provider abstraction layer.
Type-safe, provider-agnostic types and module signatures for AI model integration. Inspired by Vercel AI SDK's V3 specification.
Provider-specific options using an extensible GADT. Each provider registers its own typed key without circular dependencies.
Reason why model generation finished.
Errors from provider API calls.
Strategy for tool selection during generation.
Unified input options for both generate and stream calls.
Result of a non-streaming generation call.
Individual parts emitted during streaming generation.
Result of a streaming generation call.
Core abstraction for AI language models.
Middleware for cross-cutting concerns (logging, caching, retries).
HTTP timeout configuration.
HTTP client wrappers that apply Http_timeouts to cohttp calls.