Current section

Files

Jump to
oapi_open_ai lib schemas message attachment.ex
Raw

lib/schemas/message/attachment.ex

defmodule OpenAi.Message.Attachment do
@moduledoc """
Provides struct and type for a Message.Attachment
"""
@type t :: %__MODULE__{
file_id: String.t() | nil,
tools:
[OpenAi.Assistant.Tool.Code.t() | OpenAi.Assistant.Tool.File.SearchTypeOnly.t()] | nil
}
defstruct [:file_id, :tools]
@doc false
@spec __fields__(atom) :: keyword
def __fields__(type \\ :t)
def __fields__(:t) do
[
file_id: {:string, :generic},
tools: [
union: [{OpenAi.Assistant.Tool.Code, :t}, {OpenAi.Assistant.Tool.File.SearchTypeOnly, :t}]
]
]
end
end