Chat_response
module CM = Prompt_template.Chat_markdown
module Res = Openai.Responses
module Agent_key : sig ... end
module Agent_LRU : sig ... end
val bin_shape_persistent_form : Core.Bin_prot.Shape.t
val bin_size_persistent_form : persistent_form Core.Bin_prot.Size.sizer
val bin_write_persistent_form : persistent_form Core.Bin_prot.Write.writer
val bin_writer_persistent_form :
persistent_form Core.Bin_prot.Type_class.writer
val __bin_read_persistent_form__ :
(int -> persistent_form) Core.Bin_prot.Read.reader
val bin_read_persistent_form : persistent_form Core.Bin_prot.Read.reader
val bin_reader_persistent_form :
persistent_form Core.Bin_prot.Type_class.reader
val bin_persistent_form : persistent_form Core.Bin_prot.Type_class.t
val to_persistent : string Agent_LRU.t -> persistent_form
val of_persistent : persistent_form -> string Agent_LRU.t
val write_cache : file:Bin_prot_utils_eio.path -> string Agent_LRU.t -> unit
val read_cache : file:Bin_prot_utils_eio.path -> string Agent_LRU.t
val get_remote :
?gzip:bool ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
string ->
string
val get_content :
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
string ->
bool ->
cleanup_html:bool ->
string
val string_of_items :
env:< process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_LRU.t ->
CM.content_item list ->
string
val convert_basic_item :
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_LRU.t ->
CM.basic_content_item ->
Res.Input_message.content_item
val convert_content_item :
env:< process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_LRU.t ->
CM.content_item ->
Res.Input_message.content_item
val convert_msg :
env:< process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_LRU.t ->
CM.msg ->
Res.Item.t
val convert_reasoning : CM.reasoning -> Res.Item.t
val elements_to_items :
env:< process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_LRU.t ->
CM.top_level_elements list ->
Res.Item.t list
val convert_tools : Openai.Completions.tool list -> Res.Request.Tool.t list
val run_agent :
env:< process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_LRU.t ->
string ->
CM.content_item list ->
string
val custom_fn :
env:< process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
CM.custom_tool ->
Gpt_function.t
val agent_fn :
env:< process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_LRU.t ->
CM.agent_tool ->
Gpt_function.t
val execute_response_loop :
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:'a ->
?temperature:float ->
?max_output_tokens:int ->
?tools:Res.Request.Tool.t list ->
?reasoning:Res.Request.Reasoning.t ->
model:Res.Request.model ->
tool_tbl:(string, string -> string) Core.Hashtbl.t ->
Res.Item.t list ->
Res.Item.t list
val run_completion :
env:
< cwd : Eio.Fs.dir_ty Eio.Path.t
; fs : Eio.Fs.dir_ty Eio.Path.t
; net : [> [> `Generic ] Eio.Net.ty ] Eio.Net.t
; process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
?prompt_file:string ->
output_file:string ->
unit ->
unit
val run_completion_stream :
env:
< cwd : Eio.Fs.dir_ty Eio.Path.t
; fs : Eio.Fs.dir_ty Eio.Path.t
; net : [> [> `Generic ] Eio.Net.ty ] Eio.Net.t
; process_mgr : [> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr.. > ->
?prompt_file:string ->
output_file:string ->
unit ->
unit