Chat_completion
module Agent_key : sig ... end
module Agent_res_LRU : sig ... end
type persistent_form = {
max_size : int;
items : (Prompt_template.Chat_markdown.agent_content
* string Agent_res_LRU.entry)
list;
}
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_form : string Agent_res_LRU.t -> persistent_form
val of_persistent_form : persistent_form -> string Agent_res_LRU.t
val write_lru_to_file : filename:string -> string Agent_res_LRU.t -> unit
val read_lru_from_file : filename:string -> string Agent_res_LRU.t
val clean_html : string -> Core.String.t
val get_messages :
Prompt_template.Chat_markdown.top_level_elements list ->
Prompt_template.Chat_markdown.msg list
val get_config :
Prompt_template.Chat_markdown.top_level_elements list ->
Prompt_template.Chat_markdown.config
val get_content :
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
string ->
bool ->
string
val get_user_msg :
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_res_LRU.t ->
Prompt_template.Chat_markdown.content_item list ->
string
val convert :
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_res_LRU.t ->
Prompt_template.Chat_markdown.msg ->
Openai.Completions.chat_message
val run_agent :
string ->
Prompt_template.Chat_markdown.content_item list ->
dir:Eio.Fs.dir_ty Eio.Path.t ->
net:[> [> `Generic ] Eio.Net.ty ] Eio.Net.t ->
cache:string Agent_res_LRU.t ->
string
val run_completion :
env:
< fs : Eio.Fs.dir_ty Eio.Path.t
; net : [> [> `Generic ] Eio.Net.ty ] Eio.Net.t.. > ->
output_file:string ->
prompt_file:string option ->
unit