defmodule OpenAi.Message.CreateRequest.Attachment do @moduledoc """ Provides struct and type for a Message.CreateRequest.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