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_prompt/index.html
Module Ai_provider_openrouter.Convert_promptSource
include module type of Ai_provider_openai.Convert_prompt
Source
type openai_tool_call = Ai_provider_openai.Convert_prompt.openai_tool_call = {id : string;type_ : string;function_ : openai_function_call;
}Source
type openai_message = Ai_provider_openai.Convert_prompt.openai_message = | System_msg of {}| Developer_msg of {}| User_msg of {content : openai_content_part list;
}| Assistant_msg of {content : string option;tool_calls : openai_tool_call list;
}| Tool_msg of {}
Source
val convert_messages :
system_message_mode:Ai_provider_openai.Model_catalog.system_message_mode ->
Ai_provider.Prompt.message list ->
openai_message list * Ai_provider.Warning.t listConvert SDK messages to OpenAI format. Returns converted messages and any warnings generated.
Serialize an OpenAI message to JSON.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>