View Source ExOpenAi.Chat (ex_open_ai v0.1.9)
Represents a chat request to the OpenAI API.
examples
Examples
iex> params = %{
...> model: "text-model",
...> messages: [
...> %{content: "hello"}
...> ]
...> }
iex> ExOpenAi.Chat.create(params)
{:ok, %ExOpenAi.Chat{...}}
iex> ExOpenAi.Chat.create(%{})
{:error, %{}}
Link to this section Summary
Link to this section Types
Link to this section Functions
@spec create(ExOpenAi.Api.data(), list()) :: ExOpenAi.Parser.parsed_response()
@spec create_stream(ExOpenAi.Api.data(), list()) :: ExOpenAi.Parser.parsed_response()