AgentRunResponseExtensions.AsOpenAIChatCompletion(AgentRunResponse) Method
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.
Creates or extracts a native OpenAI OpenAI.Chat.ChatCompletion object from an AgentRunResponse.
public static OpenAI.Chat.ChatCompletion AsOpenAIChatCompletion(this Microsoft.Agents.AI.AgentRunResponse response);
static member AsOpenAIChatCompletion : Microsoft.Agents.AI.AgentRunResponse -> OpenAI.Chat.ChatCompletion
<Extension()>
Public Function AsOpenAIChatCompletion (response As AgentRunResponse) As ChatCompletion
Parameters
- response
- AgentRunResponse
The agent response.
Returns
The OpenAI OpenAI.Chat.ChatCompletion object.
Exceptions
response is null.