MicrosoftExtensionsAIResponsesExtensions.AsChatResponse 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 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.