package chatoyant
Module Chatoyant_core.ToolSource
Schema-backed callable tools.
Source
type result = {id : string;ok : bool;value : Chatoyant_runtime.Json.t option;error : string option;
}Source
val create :
name:string ->
description:string ->
parameters:Chatoyant_schema.Schema.field ->
?result_schema:Chatoyant_schema.Schema.field ->
(context ->
Chatoyant_runtime.Json.t ->
(Chatoyant_runtime.Json.t, string) result) ->
tSource
val create_typed :
name:string ->
description:string ->
args:'args Chatoyant_schema.Codec.t ->
result:'result Chatoyant_schema.Codec.t ->
(context -> 'args -> ('result, string) result) ->
tCreate a schema-backed tool from typed argument/result codecs.