Redagować

Udostępnij przez


MicrosoftExtensionsAIResponsesExtensions.AsChatResponse Method

Definition

Creates a Microsoft.Extensions.AI ChatResponse from an ResponseResult.

public static Microsoft.Extensions.AI.ChatResponse AsChatResponse(this OpenAI.Responses.ResponseResult response, OpenAI.Responses.CreateResponseOptions? options = default);
static member AsChatResponse : OpenAI.Responses.ResponseResult * OpenAI.Responses.CreateResponseOptions -> Microsoft.Extensions.AI.ChatResponse
<Extension()>
Public Function AsChatResponse (response As ResponseResult, Optional options As CreateResponseOptions = Nothing) As ChatResponse

Parameters

response
ResponseResult

The ResponseResult to convert to a ChatResponse.

options
CreateResponseOptions

The options employed in the creation of the response.

Returns

A converted ChatResponse.

Exceptions

response is null.

Applies to