Current section

Files

Jump to
oapi_open_ai lib schemas function.ex
Raw

lib/schemas/function.ex

defmodule OpenAi.Function do
@moduledoc """
Provides struct and type for a Function
"""
@type t :: %__MODULE__{description: String.t() | nil, name: String.t(), parameters: map | nil}
defstruct [:description, :name, :parameters]
@doc false
@spec __fields__(atom) :: keyword
def __fields__(type \\ :t)
def __fields__(:t) do
[description: {:string, :generic}, name: {:string, :generic}, parameters: :map]
end
end