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.3.tbz
sha256=636d458cb1564ed88ca8c0250c432e91c2f822fd49ad2b923819e762bda10be6
sha512=361e476423ebc0f9cf561cc28ccd4531cf08e424e95eea43a67d6b8dbb457a49a25b418625ffa99f6327fc5df14e540e502d1aa8ed606111c5c010fe498eec2a
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)"
>