OpenAI.Chat (openai v0.2.0)
Given a chat conversation, the model will return a chat completion response.
Link to this section Summary
Functions
Creates a completion for the chat message
Link to this section Types
Link to this type
create_completion_params()
@type create_completion_params() :: %{ :model => String.t(), :messages => [message()], optional(:temperature) => float(), optional(:top_p) => float(), optional(:n) => integer(), optional(:stream) => boolean(), optional(:stop) => String.t() | [String.t()], optional(:max_tokens) => integer(), optional(:presence_penalty) => float(), optional(:frequency_penalty) => float(), optional(:logit_bias) => %{required(String.t()) => float()}, optional(:user) => String.t() }
Link to this type
message()
Link to this section Functions
Link to this function
create_completion(client, params, opts \\ [])
@spec create_completion(OpenAI.Client.t(), create_completion_params(), Keyword.t()) :: OpenAI.Client.result()
Creates a completion for the chat message