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.2.tbz
sha256=637f60398f673dfb2e661f6ed7da169b823a870d27b48e729d5b9200e46a52b2
sha512=5aec259473395025edb6689b544e57e821cfbef9352987f95eb2182034979ce898040e06e60a9d89a40a187b77fb5b1b7183c7ec4264da9d9a834864860a5fed
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)"
>