package openai

  1. Overview
  2. Docs
val endpoint : string
type role = [
  1. | `System
  2. | `User
  3. | `Assistant
]
val yojson_of_role : [< `Assistant | `System | `User ] -> [> `String of string ]
type message = {
  1. content : string;
  2. role : role;
}
val yojson_of_message : message -> Ppx_yojson_conv_lib.Yojson.Safe.t
val send_raw_k : ((Ezcurl_core.response, Curl.curlCode * string) Stdlib.result -> 'a Lwt.t) -> Client.t -> ?model:string -> ?max_tokens:int -> messages:message list -> ?temperature:float -> ?top_p:float -> ?stream:bool -> ?n:int -> ?stop:Yojson.Safe.t list -> ?frequency_penalty:float -> ?logit_bias:(string * Yojson.Safe.t) list -> ?presence_penalty:float -> ?user:string -> unit -> 'a Lwt.t

raw API request: *

  • parameter k

    for continuation to avoid redefining labeled parameters

val extract_content : string -> string Lwt.t
val send : Client.t -> ?model:string -> ?max_tokens:int -> messages:message list -> ?temperature:float -> ?top_p:float -> ?stream:bool -> ?n:int -> ?stop:Yojson.Safe.t list -> ?frequency_penalty:float -> ?logit_bias:(string * Yojson.Safe.t) list -> ?presence_penalty:float -> ?user:string -> unit -> string Lwt.t
OCaml

Innovation. Community. Security.