Openai.Completions
val jsonaf_of_function_call :
function_call ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val function_call_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
function_call
val sexp_of_function_call : function_call -> Sexplib0.Sexp.t
val function_call_of_sexp : Sexplib0.Sexp.t -> function_call
val bin_shape_function_call : Bin_prot.Shape.t
val bin_size_function_call : function_call Bin_prot.Size.sizer
val bin_write_function_call : function_call Bin_prot.Write.writer
val bin_writer_function_call : function_call Bin_prot.Type_class.writer
val bin_read_function_call : function_call Bin_prot.Read.reader
val __bin_read_function_call__ : (int -> function_call) Bin_prot.Read.reader
val bin_reader_function_call : function_call Bin_prot.Type_class.reader
val bin_function_call : function_call Bin_prot.Type_class.t
val jsonaf_of_tool_call_chunk :
tool_call_chunk ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val tool_call_chunk_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
tool_call_chunk
val sexp_of_tool_call_chunk : tool_call_chunk -> Sexplib0.Sexp.t
val tool_call_chunk_of_sexp : Sexplib0.Sexp.t -> tool_call_chunk
val bin_shape_tool_call_chunk : Bin_prot.Shape.t
val bin_size_tool_call_chunk : tool_call_chunk Bin_prot.Size.sizer
val bin_write_tool_call_chunk : tool_call_chunk Bin_prot.Write.writer
val bin_writer_tool_call_chunk : tool_call_chunk Bin_prot.Type_class.writer
val bin_read_tool_call_chunk : tool_call_chunk Bin_prot.Read.reader
val __bin_read_tool_call_chunk__ :
(int -> tool_call_chunk) Bin_prot.Read.reader
val bin_reader_tool_call_chunk : tool_call_chunk Bin_prot.Type_class.reader
val bin_tool_call_chunk : tool_call_chunk Bin_prot.Type_class.t
type tool_call_default = {
id : string option;
function_ : function_call option;
type_ : string option;
}
val jsonaf_of_tool_call_default :
tool_call_default ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val tool_call_default_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
tool_call_default
val sexp_of_tool_call_default : tool_call_default -> Sexplib0.Sexp.t
val tool_call_default_of_sexp : Sexplib0.Sexp.t -> tool_call_default
val bin_shape_tool_call_default : Bin_prot.Shape.t
val bin_size_tool_call_default : tool_call_default Bin_prot.Size.sizer
val bin_write_tool_call_default : tool_call_default Bin_prot.Write.writer
val bin_writer_tool_call_default : tool_call_default Bin_prot.Type_class.writer
val bin_read_tool_call_default : tool_call_default Bin_prot.Read.reader
val __bin_read_tool_call_default__ :
(int -> tool_call_default) Bin_prot.Read.reader
val bin_reader_tool_call_default : tool_call_default Bin_prot.Type_class.reader
val bin_tool_call_default : tool_call_default Bin_prot.Type_class.t
val jsonaf_of_image_url : image_url -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val image_url_of_jsonaf : Ppx_jsonaf_conv_lib.Jsonaf_kernel.t -> image_url
val sexp_of_image_url : image_url -> Sexplib0.Sexp.t
val image_url_of_sexp : Sexplib0.Sexp.t -> image_url
val jsonaf_of_content_item :
content_item ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val content_item_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
content_item
val sexp_of_content_item : content_item -> Sexplib0.Sexp.t
val content_item_of_sexp : Sexplib0.Sexp.t -> content_item
val sexp_of_chat_message_content : chat_message_content -> Sexplib0.Sexp.t
val chat_message_content_of_sexp : Sexplib0.Sexp.t -> chat_message_content
val jsonaf_of_chat_message_content :
chat_message_content ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val chat_message_content_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
chat_message_content
type chat_message = {
role : string;
content : chat_message_content option;
name : string option;
tool_call_id : string option;
function_call : function_call option;
tool_calls : tool_call_default list option;
}
val sexp_of_chat_message : chat_message -> Sexplib0.Sexp.t
val chat_message_of_sexp : Sexplib0.Sexp.t -> chat_message
val jsonaf_of_chat_message :
chat_message ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val chat_message_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
chat_message
type message = {
content : string option;
refusal : string option;
role : string;
function_call : function_call option;
tool_calls : tool_call_default list option;
}
val jsonaf_of_message : message -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val message_of_jsonaf : Ppx_jsonaf_conv_lib.Jsonaf_kernel.t -> message
val sexp_of_message : message -> Sexplib0.Sexp.t
val message_of_sexp : Sexplib0.Sexp.t -> message
val bin_shape_message : Bin_prot.Shape.t
val bin_size_message : message Bin_prot.Size.sizer
val bin_write_message : message Bin_prot.Write.writer
val bin_writer_message : message Bin_prot.Type_class.writer
val bin_read_message : message Bin_prot.Read.reader
val __bin_read_message__ : (int -> message) Bin_prot.Read.reader
val bin_reader_message : message Bin_prot.Type_class.reader
val bin_message : message Bin_prot.Type_class.t
val jsonaf_of_func : func -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val func_of_jsonaf : Ppx_jsonaf_conv_lib.Jsonaf_kernel.t -> func
val sexp_of_func : func -> Sexplib0.Sexp.t
val func_of_sexp : Sexplib0.Sexp.t -> func
val jsonaf_of_tool_func : tool_func -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val tool_func_of_jsonaf : Ppx_jsonaf_conv_lib.Jsonaf_kernel.t -> tool_func
val sexp_of_tool_func : tool_func -> Sexplib0.Sexp.t
val tool_func_of_sexp : Sexplib0.Sexp.t -> tool_func
val jsonaf_of_tool : tool -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val tool_of_jsonaf : Ppx_jsonaf_conv_lib.Jsonaf_kernel.t -> tool
val sexp_of_tool : tool -> Sexplib0.Sexp.t
val tool_of_sexp : Sexplib0.Sexp.t -> tool
val jsonaf_of_schema : schema -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val schema_of_jsonaf : Ppx_jsonaf_conv_lib.Jsonaf_kernel.t -> schema
val sexp_of_schema : schema -> Sexplib0.Sexp.t
val schema_of_sexp : Sexplib0.Sexp.t -> schema
val jsonaf_of_response_format :
response_format ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val response_format_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
response_format
val sexp_of_response_format : response_format -> Sexplib0.Sexp.t
val response_format_of_sexp : Sexplib0.Sexp.t -> response_format
type delta = {
content : string option;
function_call : function_call option;
refusal : string option;
role : string option;
tool_calls : tool_call_chunk list option;
}
val jsonaf_of_delta : delta -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val delta_of_jsonaf : Ppx_jsonaf_conv_lib.Jsonaf_kernel.t -> delta
val sexp_of_delta : delta -> Sexplib0.Sexp.t
val delta_of_sexp : Sexplib0.Sexp.t -> delta
val bin_shape_delta : Bin_prot.Shape.t
val bin_size_delta : delta Bin_prot.Size.sizer
val bin_write_delta : delta Bin_prot.Write.writer
val bin_writer_delta : delta Bin_prot.Type_class.writer
val bin_read_delta : delta Bin_prot.Read.reader
val __bin_read_delta__ : (int -> delta) Bin_prot.Read.reader
val bin_reader_delta : delta Bin_prot.Type_class.reader
val bin_delta : delta Bin_prot.Type_class.t
val jsonaf_of_stream_choice :
stream_choice ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val stream_choice_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
stream_choice
val sexp_of_stream_choice : stream_choice -> Sexplib0.Sexp.t
val stream_choice_of_sexp : Sexplib0.Sexp.t -> stream_choice
val bin_shape_stream_choice : Bin_prot.Shape.t
val bin_size_stream_choice : stream_choice Bin_prot.Size.sizer
val bin_write_stream_choice : stream_choice Bin_prot.Write.writer
val bin_writer_stream_choice : stream_choice Bin_prot.Type_class.writer
val bin_read_stream_choice : stream_choice Bin_prot.Read.reader
val __bin_read_stream_choice__ : (int -> stream_choice) Bin_prot.Read.reader
val bin_reader_stream_choice : stream_choice Bin_prot.Type_class.reader
val bin_stream_choice : stream_choice Bin_prot.Type_class.t
val jsonaf_of_chat_completion_chunk :
chat_completion_chunk ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val chat_completion_chunk_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
chat_completion_chunk
val sexp_of_chat_completion_chunk : chat_completion_chunk -> Sexplib0.Sexp.t
val chat_completion_chunk_of_sexp : Sexplib0.Sexp.t -> chat_completion_chunk
val bin_shape_chat_completion_chunk : Bin_prot.Shape.t
val bin_size_chat_completion_chunk : chat_completion_chunk Bin_prot.Size.sizer
val bin_write_chat_completion_chunk :
chat_completion_chunk Bin_prot.Write.writer
val bin_writer_chat_completion_chunk :
chat_completion_chunk Bin_prot.Type_class.writer
val bin_read_chat_completion_chunk : chat_completion_chunk Bin_prot.Read.reader
val __bin_read_chat_completion_chunk__ :
(int -> chat_completion_chunk) Bin_prot.Read.reader
val bin_reader_chat_completion_chunk :
chat_completion_chunk Bin_prot.Type_class.reader
val bin_chat_completion_chunk : chat_completion_chunk Bin_prot.Type_class.t
val jsonaf_of_default_choice :
default_choice ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val default_choice_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
default_choice
val sexp_of_default_choice : default_choice -> Sexplib0.Sexp.t
val default_choice_of_sexp : Sexplib0.Sexp.t -> default_choice
val bin_shape_default_choice : Bin_prot.Shape.t
val bin_size_default_choice : default_choice Bin_prot.Size.sizer
val bin_write_default_choice : default_choice Bin_prot.Write.writer
val bin_writer_default_choice : default_choice Bin_prot.Type_class.writer
val bin_read_default_choice : default_choice Bin_prot.Read.reader
val __bin_read_default_choice__ : (int -> default_choice) Bin_prot.Read.reader
val bin_reader_default_choice : default_choice Bin_prot.Type_class.reader
val bin_default_choice : default_choice Bin_prot.Type_class.t
val jsonaf_of_chat_completion :
chat_completion ->
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val chat_completion_of_jsonaf :
Ppx_jsonaf_conv_lib.Jsonaf_kernel.t ->
chat_completion
val sexp_of_chat_completion : chat_completion -> Sexplib0.Sexp.t
val chat_completion_of_sexp : Sexplib0.Sexp.t -> chat_completion
val bin_shape_chat_completion : Bin_prot.Shape.t
val bin_size_chat_completion : chat_completion Bin_prot.Size.sizer
val bin_write_chat_completion : chat_completion Bin_prot.Write.writer
val bin_writer_chat_completion : chat_completion Bin_prot.Type_class.writer
val bin_read_chat_completion : chat_completion Bin_prot.Read.reader
val __bin_read_chat_completion__ :
(int -> chat_completion) Bin_prot.Read.reader
val bin_reader_chat_completion : chat_completion Bin_prot.Type_class.reader
val bin_chat_completion : chat_completion Bin_prot.Type_class.t
type _ response_type =
| Stream : (stream_choice -> unit) -> unit response_type
| Default : default_choice response_type
val jsonaf_of_model : model -> Ppx_jsonaf_conv_lib.Jsonaf_kernel.t
val model_of_jsonaf : Ppx_jsonaf_conv_lib.Jsonaf_kernel.t -> model
val sexp_of_model : model -> Sexplib0.Sexp.t
val model_of_sexp : Sexplib0.Sexp.t -> model
val model_of_str_exn : string -> model
val post_chat_completion :
'a. 'a response_type ->
?max_tokens:int ->
?temperature:float ->
?functions:func list ->
?tools:tool list ->
?model:model ->
?reasoning_effort:string ->
dir:Eio.Fs.dir_ty Eio.Path.t ->
'n Eio.Net.t ->
inputs:chat_message list ->
'a