Noizu.OpenAI.Engine (Noizu Labs: OpenAI v0.1.3)

The Noizu.OpenAI.Engine struct represents an engine object from the OpenAI API.

Link to this section Summary

Functions

Creates a Noizu.OpenAI.Engine struct from a map with atom keys.

Link to this section Types

@type t() :: %Noizu.OpenAI.Engine{
  id: String.t(),
  object: String.t(),
  owner: String.t(),
  ready: boolean()
}

Link to this section Functions

@spec from_json(map()) :: t()

Creates a Noizu.OpenAI.Engine struct from a map with atom keys.

examples

Examples

iex> json = %{
...>   id: "text-davinci-003",
...>   object: "engine",
...>   owner: "openai",
...>   ready: true
...> }
...> Noizu.OpenAI.Engine.from_json(json)
%Noizu.OpenAI.Engine{
  id: "text-davinci-003",
  object: "engine",
  owner: "openai",
  ready: true
}