Response 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.
The Response.
public class Response : Azure.AI.AgentServer.Contracts.Generated.Common.IUtf8JsonSerializable, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Contracts.Generated.Responses.Response>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Contracts.Generated.Responses.Response>
type Response = class
interface IUtf8JsonSerializable
interface IJsonModel<Response>
interface IPersistableModel<Response>
Public Class Response
Implements IJsonModel(Of Response), IPersistableModel(Of Response), IUtf8JsonSerializable
- Inheritance
-
Response
- Implements
Constructors
Properties
| Name | Description |
|---|---|
| Agent |
The agent used for this response. |
| Background |
Whether to run the model response in the background. Learn more. |
| Conversation |
Gets the conversation. |
| CreatedAt |
Unix timestamp (in seconds) of when this Response was created. |
| Error |
Gets the error. |
| Id |
Unique identifier for this Response. |
| IncompleteDetails |
Details about why the response is incomplete. |
| Instructions |
A system (or developer) message inserted into the model's context. When using along with 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 |
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. |
| MaxToolCalls |
The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. |
| Metadata |
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. |
| 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 |
SDK-only convenience property that contains the aggregated text output
from all |
| ParallelToolCalls |
Whether to allow the model to run tool calls in parallel. |
| PreviousResponseId |
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state. |
| Prompt |
Gets the prompt. |
| Reasoning |
Gets the reasoning. |
| ServiceTier |
Note: service_tier is not applicable to Azure OpenAI. |
| Status |
The status of the response generation. One of |
| StructuredInputs |
The structured inputs to the response that can participate in prompt template substitution or tool argument bindings. To assign an object to the value of this property use FromObjectAsJson<T>(T, JsonSerializerOptions). To assign an already formatted json string to this property use FromString(String). Examples:
|
| Temperature |
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 |
| Text |
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: |
| ToolChoice |
How the model should select which tool (or tools) to use when generating
a response. See the 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 |
An array of tools the model may call while generating a response. You
can specify which tool to use by setting the The two categories of tools you can provide the model are:
|
| TopLogprobs |
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. |
| TopP |
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. We generally recommend altering this or |
| Truncation |
The truncation strategy to use for the model response.
|
| Usage |
Gets the usage. |
| User |
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. |
Methods
| Name | Description |
|---|---|
| DeserializeResponse(JsonElement, ModelReaderWriterOptions) | |
| FromResponse(Response) |
Deserializes the model from a raw response. |
| JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions) | |
| ToRequestContent() |
Convert into a RequestContent. |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IJsonModel<Response>.Create(Utf8JsonReader, ModelReaderWriterOptions) |
Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model. |
| IJsonModel<Response>.Write(Utf8JsonWriter, ModelReaderWriterOptions) |
Writes the model to the provided Utf8JsonWriter. |
| IPersistableModel<Response>.Create(BinaryData, ModelReaderWriterOptions) |
Converts the provided BinaryData into a model. |
| IPersistableModel<Response>.GetFormatFromOptions(ModelReaderWriterOptions) |
Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service. |
| IPersistableModel<Response>.Write(ModelReaderWriterOptions) |
Writes the model into a BinaryData. |
| IUtf8JsonSerializable.Write(Utf8JsonWriter) | |