AgentResponseExtensions 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.
Provides extension methods for AgentResponse and AgentResponseUpdate instances to create or extract native OpenAI response objects from the Microsoft Agent Framework responses.
public static class AgentResponseExtensions
type AgentResponseExtensions = class
Public Module AgentResponseExtensions
- Inheritance
-
AgentResponseExtensions
Methods
| Name | Description |
|---|---|
| AsChatResponse(AgentResponse) |
Creates a ChatResponse from an AgentResponse instance. |
| AsChatResponseUpdate(AgentResponseUpdate) |
Creates a ChatResponseUpdate from an AgentResponseUpdate instance. |
| AsChatResponseUpdatesAsync(IAsyncEnumerable<AgentResponseUpdate>) |
Creates an asynchronous enumerable of ChatResponseUpdate instances from an asynchronous enumerable of AgentResponseUpdate instances. |
| AsOpenAIChatCompletion(AgentResponse) |
Creates or extracts a native OpenAI OpenAI.Chat.ChatCompletion object from an AgentResponse. |
| AsOpenAIResponse(AgentResponse) |
Creates or extracts a native OpenAI OpenAI.Responses.ResponseResult object from an AgentResponse. |
| ToAgentResponse(IEnumerable<AgentResponseUpdate>) |
Combines a sequence of AgentResponseUpdate instances into a single AgentResponse. |
| ToAgentResponseAsync(IAsyncEnumerable<AgentResponseUpdate>, CancellationToken) |
Asynchronously combines a sequence of AgentResponseUpdate instances into a single AgentResponse. |