ResponseObject Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Layer 3 convenience extensions for ResponseObject.
public class ResponseObject : System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Responses.Models.ResponseObject>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Responses.Models.ResponseObject>
type ResponseObject = class
interface IJsonModel<ResponseObject>
interface IPersistableModel<ResponseObject>
Public Class ResponseObject
Implements IJsonModel(Of ResponseObject), IPersistableModel(Of ResponseObject)
- Inheritance
-
ResponseObject
- Implements
Constructors
| Name | Description |
|---|---|
| ResponseObject(String, DateTimeOffset, ResponseErrorInfo, ResponseIncompleteDetails, IEnumerable<OutputItem>, BinaryData, Boolean, AgentReference) |
Initializes a new instance of ResponseObject. |
| ResponseObject(String, String) |
Creates a new ResponseObject with minimal required fields. |
Properties
| Name | Description |
|---|---|
| Agent |
(Deprecated) Use agent_reference instead. The agent used for this response |
| AgentReference |
The agent used for this response. |
| AgentSessionId |
The session identifier for this response. Currently only relevant for hosted agents. Always returned for hosted agents — either the caller-provided value, the auto-derived value, or an auto-generated UUID. Use for session-scoped operations and to maintain sandbox affinity in follow-up calls. |
| Background |
Gets or sets the Background. |
| CompletedAt |
Gets or sets the CompletedAt. |
| Conversation |
Gets or sets the Conversation. |
| CreatedAt |
Unix timestamp (in seconds) of when this Response was created. |
| Error |
Gets or sets the Error. |
| Id |
Unique identifier for this Response. |
| IncompleteDetails |
Gets or sets the IncompleteDetails. |
| Instructions |
Gets or sets the Instructions. To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions). To assign an already formatted json string to this property use FromString(String). <remarks> Supported types: </remarks>Examples:
|
| MaxOutputTokens |
Gets or sets the MaxOutputTokens. |
| MaxToolCalls |
Gets or sets the MaxToolCalls. |
| Metadata |
Gets or sets the Metadata. |
| Model |
The model deployment to use for the creation of this response. |
| Object |
The object type of this resource - always set to |
| Output |
An array of content items generated by the model.
|
| OutputText |
Gets or sets the OutputText. |
| ParallelToolCalls |
Whether to allow the model to run tool calls in parallel. |
| PreviousResponseId |
Gets or sets the PreviousResponseId. |
| Prompt |
Gets or sets the Prompt. |
| PromptCacheKey |
Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the |
| PromptCacheRetention |
Gets or sets the PromptCacheRetention. |
| Reasoning |
Gets or sets the Reasoning. |
| SafetyIdentifier |
A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. Learn more. |
| ServiceTier |
Gets or sets the ServiceTier. |
| Status |
The status of the response generation. One of |
| Temperature |
Gets or sets the Temperature. |
| Text |
Gets or sets the Text. |
| ToolChoice |
Gets or sets the ToolChoice. To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions). To assign an already formatted json string to this property use FromString(String). <remarks> Supported types: </remarks>Examples:
|
| Tools |
Gets the Tools. |
| TopLogprobs |
Gets or sets the TopLogprobs. |
| TopP |
Gets or sets the TopP. |
| Truncation |
Gets or sets the Truncation. |
| Usage |
Gets or sets the Usage. |
| User |
This field is being replaced by |
Methods
Operators
| Name | Description |
|---|---|
| Explicit(ClientResult to ResponseObject) | |
Explicit Interface Implementations
Extension Methods
| Name | Description |
|---|---|
| GetInstructionItems(ResponseObject) |
Expands the Instructions BinaryData into a typed list of Item objects. A plain string is wrapped as a single ItemMessage with Developer role and the instruction text. |
| GetToolChoiceExpanded(ResponseObject) |
Expands the ToolChoice BinaryData into a typed
ToolChoiceParam. String shorthands ( |
| SetInstructions(ResponseObject, IList<Item>) |
Sets the Instructions property from a list of Item objects. |
| SetInstructions(ResponseObject, String) |
Sets the Instructions property from a plain text string. |
| SetToolChoice(ResponseObject, ToolChoiceOptions) |
Sets the ToolChoice property from a ToolChoiceOptions enum value (string shorthand). |
| SetToolChoice(ResponseObject, ToolChoiceParam) |
Sets the ToolChoice property from a typed ToolChoiceParam object. |
| Snapshot(ResponseObject) |
Creates an immutable deep copy of the ResponseObject via ModelReaderWriter round-trip serialization. |