package chatoyant
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
OCaml-first LLM SDK with Melange-generated JavaScript
Install
dune-project
Dependency
Authors
Maintainers
Sources
chatoyant-v0.12.2.tbz
sha256=a885dcf4b3c6ede268e2027bedf6955a5c889f7ed01c40b719f8369655957d47
sha512=0bb8dfa12157ba2e482927717c2242c1ea914dce1427801e405987811550afbd6d6b11f07d1e1379259360d17f4ca43ff81963bf407cddb7bedd0dfbb93a55ee
doc/chatoyant.provider/Chatoyant_provider/Anthropic/index.html
Module Chatoyant_provider.AnthropicSource
Raw Anthropic Messages API request shapes.
Source
type cache_control = | Ephemeral_cache of cache_ttl option| Raw_cache_control of Chatoyant_runtime.Json.t(*Prompt caching marker. Anthropic accepts
*)cache_controlat the request top level, on cacheable content blocks, and on tool definitions.
Source
type content_block = | Text of string| Cached_block of {block : content_block;cache_control : cache_control;
}| Thinking of string| Redacted_thinking of string| Tool_use of {id : string;name : string;input : Chatoyant_runtime.Json.t;
}| Tool_result of {}| Server_tool_use of {id : string;name : string;input : Chatoyant_runtime.Json.t;raw : Chatoyant_runtime.Json.t;
}| Web_search_tool_result of {tool_use_id : string;content : Chatoyant_runtime.Json.t;raw : Chatoyant_runtime.Json.t;
}| Web_fetch_tool_result of {tool_use_id : string;content : Chatoyant_runtime.Json.t;raw : Chatoyant_runtime.Json.t;
}| Code_execution_tool_result of {tool_use_id : string;content : Chatoyant_runtime.Json.t;raw : Chatoyant_runtime.Json.t;
}| Container_upload of {file_id : string option;raw : Chatoyant_runtime.Json.t;
}| Raw_block of Chatoyant_runtime.Json.t
Source
type tool = {tool_name : string;tool_description : string option;input_schema : Chatoyant_runtime.Json.t;tool_cache_control : cache_control option;
}Source
type request = {model : string;messages : message list;system : string option;system_blocks : content_block list;max_tokens : int;stream : bool;temperature : float option;top_p : float option;top_k : int option;stop_sequences : string list;metadata_user_id : string option;tools : tool list;tool_choice : tool_choice option;thinking : thinking option;cache_control : cache_control option;extra : (string * Chatoyant_runtime.Json.t) list;
}Source
type response = {response_id : string option;response_model : string option;response_role : role option;response_content : content_block list;response_stop_reason : stop_reason option;response_stop_sequence : string option;response_usage : usage;response_raw : Chatoyant_runtime.Json.t;
}Source
type api_error = {error_type : string option;error_message : string;error_raw : Chatoyant_runtime.Json.t option;
}Source
type model = {model_id : string;model_display_name : string option;model_created_at : string option;model_type : string option;model_raw : Chatoyant_runtime.Json.t;
}Source
type model_list = {models : model list;first_id : string option;last_id : string option;has_more : bool;raw : Chatoyant_runtime.Json.t;
}Source
type message_batch = {batch_id : string;batch_type : string option;processing_status : batch_status;request_counts : batch_counts;ended_at : string option;created_at : string option;expires_at : string option;archived_at : string option;cancel_initiated_at : string option;results_url : string option;raw : Chatoyant_runtime.Json.t;
}Source
type batch_list = {batches : message_batch list;first_id : string option;last_id : string option;has_more : bool;raw : Chatoyant_runtime.Json.t;
}Source
type batch_result = | Batch_succeeded of response| Batch_errored of api_error| Batch_canceled| Batch_expired| Batch_unknown of Chatoyant_runtime.Json.t
Source
type batch_result_line = {result_custom_id : string;result : batch_result;result_raw : Chatoyant_runtime.Json.t;
}Source
type file_metadata = {file_id : string;file_type : string option;filename : string option;mime_type : string option;size_bytes : int option;created_at : string option;downloadable : bool option;file_raw : Chatoyant_runtime.Json.t;
}Source
type file_list = {files : file_metadata list;first_id : string option;last_id : string option;has_more : bool;raw : Chatoyant_runtime.Json.t;
}Source
type file_delete = {deleted_file_id : string option;deleted : bool;raw : Chatoyant_runtime.Json.t;
}Source
type stream_delta = | Text_delta of string| Thinking_delta of string| Signature_delta of string| Input_json_delta of string| Unknown_delta of Chatoyant_runtime.Json.t
Source
type stream_event = | Message_start of response| Content_block_start of {index : int;block : content_block;
}| Content_block_delta of {index : int;delta : stream_delta;
}| Content_block_stop of int| Message_delta of {stop_reason : stop_reason option;stop_sequence : string option;usage : usage;
}| Message_stop| Ping| Error of api_error| Unknown_event of {event_type : string option;raw : Chatoyant_runtime.Json.t;
}
Source
val web_search_tool_json :
?name:string ->
?cache_control:cache_control ->
?max_uses:int ->
?allowed_domains:string list ->
?blocked_domains:string list ->
?user_location:Chatoyant_runtime.Json.t ->
unit ->
Chatoyant_runtime.Json.tSource
val web_fetch_tool_json :
?name:string ->
?cache_control:cache_control ->
unit ->
Chatoyant_runtime.Json.tSource
val code_execution_tool_json :
?name:string ->
?cache_control:cache_control ->
unit ->
Chatoyant_runtime.Json.tSource
val request_json_with_raw_tools :
request ->
Chatoyant_runtime.Json.t list ->
Chatoyant_runtime.Json.tSource
module Make_provider
(Http : Chatoyant_runtime.Effect.HTTP)
(Config : sig ... end) :
Provider.CHAT sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>