package ocaml-ai-sdk
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
OCaml AI SDK - Provider abstraction for AI models
Install
dune-project
Dependency
Authors
Maintainers
Sources
ocaml-ai-sdk-0.6.1.tbz
sha256=cb3b82428abcda76c02ec92f8103a4db28edf3f42795794a37135e9a3c40af96
sha512=11be8889ee25bee67b2be00553c42a4692bc73e5ce23985e8bb87f8a07e9d8f556b5a63b219fe5fe30366c8b0d4edae494afa80ccfbfcb112f1fa1e458de55bf
doc/ocaml-ai-sdk.ai_provider_openrouter/Ai_provider_openrouter/Convert_response/index.html
Module Ai_provider_openrouter.Convert_responseSource
OpenRouter response conversion.
Source
type reasoning_detail_json = {type_ : string;text : string option;signature : string option;data : string option;summary : string option;
}JSON representation of a reasoning detail (text, encrypted, or summary).
Source
type Ai_provider.Provider_options.key += | Openrouter_provider : string Ai_provider.Provider_options.key| Openrouter_reasoning_details : reasoning_detail_json list Ai_provider.Provider_options.key
Provider metadata keys.
Convert a single reasoning detail to an SDK content part.
Source
type annotation_json = {type_ : string;url : string option;title : string option;start_index : int option;end_index : int option;
}JSON representation of an annotation (e.g. url_citation from web search).
Convert a url_citation annotation to a Source content part. ~index is used to generate a unique ID for the source.
JSON representation of an image in the response.
Convert an image response to a File content part.
Check whether any reasoning details contain encrypted reasoning.
Map OpenRouter finish reason string to SDK finish reason.
Parse a JSON response into a generate result.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>