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.4.tbz
sha256=4f3f22ae61d360b994cd75323bcb6b6bf915f6755fd1e7bab6844ca8a240c1e7
sha512=3c52b17096da818f5d3bcf9fe16826c3bec4533d6a1681e8ba0f957f37ee4f425696017cb78f1a24732f8851010d436cf446f873b72b6a4f5004d6b492072abf
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)"
>