Share via


AgentRunResponseExtensions.AsOpenAIChatCompletion(AgentRunResponse) Method

Definition

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

OpenAI.Chat.ChatCompletion

The OpenAI OpenAI.Chat.ChatCompletion object.

Exceptions

response is null.

Applies to