Class ResponsesResponse

java.lang.Object
com.azure.ai.openai.responses.models.ResponsesResponse
All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponsesResponse>

public final class ResponsesResponse extends Object implements com.azure.json.JsonSerializable<ResponsesResponse>
The ResponsesResponse model.
  • Method Details

    • getId

      public String getId()
      Get the id property: A unique identifier for this Response.
      Returns:
      the id value.
    • getObject

      public String getObject()
      Get the object property: The object type of this resource - always set to `response`.
      Returns:
      the object value.
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Get the createdAt property: Unix timestamp (in seconds) of when this Response was created.
      Returns:
      the createdAt value.
    • getStatus

      public ResponsesResponseStatus getStatus()
      Get the status property: The status of the response generation.
      Returns:
      the status value.
    • getError

      public ResponsesError getError()
      Get the error property: The error property.
      Returns:
      the error value.
    • getIncompleteDetails

      public ResponsesResponseIncompleteDetails getIncompleteDetails()
      Get the incompleteDetails property: The incomplete_details property.
      Returns:
      the incompleteDetails value.
    • getInstructions

      public String getInstructions()
      Get the instructions property: The instructions property.
      Returns:
      the instructions value.
    • getMaxOutputTokens

      public Integer getMaxOutputTokens()
      Get the maxOutputTokens property: The max_output_tokens property.
      Returns:
      the maxOutputTokens value.
    • getModel

      public String getModel()
      Get the model property: The model used to generate this Response.
      Returns:
      the model value.
    • getOutput

      public List<ResponsesItem> getOutput()
      Get the output property: An array of content items generated by the model.
      Returns:
      the output value.
    • isParallelToolCalls

      public boolean isParallelToolCalls()
      Get the parallelToolCalls property: The parallel_tool_calls property.
      Returns:
      the parallelToolCalls value.
    • getPreviousResponseId

      public String getPreviousResponseId()
      Get the previousResponseId property: The unique ID of the previous response to the model. Use this to create multi-turn conversations.
      Returns:
      the previousResponseId value.
    • getReasoning

      public ResponsesReasoningConfiguration getReasoning()
      Get the reasoning property: The reasoning property.
      Returns:
      the reasoning value.
    • getTemperature

      public double getTemperature()
      Get the temperature property: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both.
      Returns:
      the temperature value.
    • getText

      public ResponseTextOptions getText()
      Get the text property: The text property.
      Returns:
      the text value.
    • getToolChoice

      public com.azure.core.util.BinaryData getToolChoice()
      Get the toolChoice property: The tool_choice property.
      Returns:
      the toolChoice value.
    • getTools

      public List<ResponsesTool> getTools()
      Get the tools property: The tools available to the model when generating a Response.
      Returns:
      the tools value.
    • getTopP

      public double getTopP()
      Get the topP property: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
      Returns:
      the topP value.
    • getTruncation

      public ResponseTruncation getTruncation()
      Get the truncation property: The truncation strategy to use for the model response. - `auto`: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - `disabled`: If a model response will exceed the context window size for a model, the request will fail with a 400 error.
      Returns:
      the truncation value.
    • getUsage

      public ResponsesResponseUsage getUsage()
      Get the usage property: The usage property.
      Returns:
      the usage value.
    • getUser

      public String getUser()
      Get the user property: The user property.
      Returns:
      the user value.
    • getMetadata

      public Map<String,String> getMetadata()
      Get the metadata property: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
      Returns:
      the metadata value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ResponsesResponse>
      Throws:
      IOException
    • fromJson

      public static ResponsesResponse fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ResponsesResponse from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ResponsesResponse if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the ResponsesResponse.