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 Summary
Modifier and TypeMethodDescriptionstatic ResponsesResponsefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResponsesResponse from the JsonReader.Get the createdAt property: Unix timestamp (in seconds) of when this Response was created.getError()Get the error property: The error property.getId()Get the id property: A unique identifier for this Response.Get the incompleteDetails property: The incomplete_details property.Get the instructions property: The instructions property.Get the maxOutputTokens property: The max_output_tokens property.Get the metadata property: Set of 16 key-value pairs that can be attached to an object.getModel()Get the model property: The model used to generate this Response.Get the object property: The object type of this resource - always set to `response`.Get the output property: An array of content items generated by the model.Get the previousResponseId property: The unique ID of the previous response to the model.Get the reasoning property: The reasoning property.Get the status property: The status of the response generation.doubleGet the temperature property: What sampling temperature to use, between 0 and 2.getText()Get the text property: The text property.com.azure.core.util.BinaryDataGet the toolChoice property: The tool_choice property.getTools()Get the tools property: The tools available to the model when generating a Response.doublegetTopP()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.Get the truncation property: The truncation strategy to use for the model responsegetUsage()Get the usage property: The usage property.getUser()Get the user property: The user property.booleanGet the parallelToolCalls property: The parallel_tool_calls property.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getId
Get the id property: A unique identifier for this Response.- Returns:
- the id value.
-
getObject
Get the object property: The object type of this resource - always set to `response`.- Returns:
- the object value.
-
getCreatedAt
Get the createdAt property: Unix timestamp (in seconds) of when this Response was created.- Returns:
- the createdAt value.
-
getStatus
Get the status property: The status of the response generation.- Returns:
- the status value.
-
getError
Get the error property: The error property.- Returns:
- the error value.
-
getIncompleteDetails
Get the incompleteDetails property: The incomplete_details property.- Returns:
- the incompleteDetails value.
-
getInstructions
Get the instructions property: The instructions property.- Returns:
- the instructions value.
-
getMaxOutputTokens
Get the maxOutputTokens property: The max_output_tokens property.- Returns:
- the maxOutputTokens value.
-
getModel
Get the model property: The model used to generate this Response.- Returns:
- the model value.
-
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
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
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
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
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
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
Get the usage property: The usage property.- Returns:
- the usage value.
-
getUser
Get the user property: The user property.- Returns:
- the user value.
-
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ResponsesResponse>- Throws:
IOException
-
fromJson
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.
-