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.5.tbz
sha256=9e3437d6ebf48ec9f5d9a8afd62eaeece124023f02dbd87e4b291205fd309b72
sha512=605c10ed62c0cbc31a151b7031cc80a284d5c94231c1ef423ae7439572e3fadddab4a45f52eaeeef83973a8e324839b9fda03f9082deef1b6781353f63975510
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)"
>