package openai

  1. Overview
  2. Docs

Module Openai.Chat_completionSource

Sourceval endpoint : string
Sourcetype role = [
  1. | `System
  2. | `User
  3. | `Assistant
]
Sourceval yojson_of_role : [< `Assistant | `System | `User ] -> [> `String of string ]
Sourcetype message = {
  1. content : string;
  2. role : role;
}
Sourceval send_raw_k : ((Ezcurl_core.response, Curl.curlCode * string) 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

Sourceval extract_content : string -> string Lwt.t
Sourceval 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.