View Source ExOpenAI.Components.Response (ex_openai.ex v1.8.0)

Schema representing a Response within the OpenAI API

Summary

Types

@type t() :: %ExOpenAI.Components.Response{
  created_at: float(),
  error: ExOpenAI.Components.ResponseError.t(),
  id: String.t(),
  incomplete_details: %{reason: :content_filter | :max_output_tokens},
  instructions: String.t(),
  max_output_tokens: integer() | nil,
  metadata: ExOpenAI.Components.Metadata.t(),
  model:
    (:"gpt-3.5-turbo-16k-0613"
     | :"gpt-3.5-turbo-0125"
     | :"gpt-3.5-turbo-1106"
     | :"gpt-3.5-turbo-0613"
     | :"gpt-3.5-turbo-0301"
     | :"gpt-3.5-turbo-16k"
     | :"gpt-3.5-turbo"
     | :"gpt-4-32k-0613"
     | :"gpt-4-32k-0314"
     | :"gpt-4-32k"
     | :"gpt-4-0613"
     | :"gpt-4-0314"
     | :"gpt-4"
     | :"gpt-4-vision-preview"
     | :"gpt-4-1106-preview"
     | :"gpt-4-turbo-preview"
     | :"gpt-4-0125-preview"
     | :"gpt-4-turbo-2024-04-09"
     | :"gpt-4-turbo"
     | :"gpt-4o-mini-2024-07-18"
     | :"gpt-4o-mini"
     | :"chatgpt-4o-latest"
     | :"gpt-4o-mini-audio-preview-2024-12-17"
     | :"gpt-4o-mini-audio-preview"
     | :"gpt-4o-audio-preview-2024-12-17"
     | :"gpt-4o-audio-preview-2024-10-01"
     | :"gpt-4o-audio-preview"
     | :"gpt-4o-2024-05-13"
     | :"gpt-4o-2024-08-06"
     | :"gpt-4o-2024-11-20"
     | :"gpt-4o"
     | :"gpt-4.5-preview-2025-02-27"
     | :"gpt-4.5-preview"
     | :"computer-use-preview-2025-03-11"
     | :"computer-use-preview-2025-02-04"
     | :"computer-use-preview"
     | :"o1-mini-2024-09-12"
     | :"o1-mini"
     | :"o1-preview-2024-09-12"
     | :"o1-preview"
     | :"o1-2024-12-17"
     | :o1
     | :"o3-mini-2025-01-31"
     | :"o3-mini")
    | String.t(),
  object: :response,
  output: [ExOpenAI.Components.OutputItem.t()],
  output_text: String.t() | nil,
  parallel_tool_calls: boolean(),
  previous_response_id: String.t() | nil,
  reasoning: ExOpenAI.Components.Reasoning.t() | nil,
  status: (:incomplete | :in_progress | :failed | :completed) | nil,
  temperature: float(),
  text:
    %{format: ExOpenAI.Components.TextResponseFormatConfiguration.t()} | nil,
  tool_choice:
    ExOpenAI.Components.ToolChoiceFunction.t()
    | ExOpenAI.Components.ToolChoiceTypes.t()
    | ExOpenAI.Components.ToolChoiceOptions.t(),
  tools: [ExOpenAI.Components.Tool.t()],
  top_p: float(),
  truncation: (:disabled | :auto) | nil,
  usage: ExOpenAI.Components.ResponseUsage.t() | nil,
  user: String.t() | nil
}