ResponseConverterExtensions.ToItemResource 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.
Converts a chat message to a collection of item resources.
public static System.Collections.Generic.IEnumerable<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ItemResource> ToItemResource(this Microsoft.Extensions.AI.ChatMessage message, Azure.AI.AgentServer.Core.Common.Id.IIdGenerator idGenerator, string responseId);
static member ToItemResource : Microsoft.Extensions.AI.ChatMessage * Azure.AI.AgentServer.Core.Common.Id.IIdGenerator * string -> seq<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ItemResource>
<Extension()>
Public Iterator Function ToItemResource (message As ChatMessage, idGenerator As IIdGenerator, responseId As String) As IEnumerable(Of ItemResource)
Parameters
- message
- ChatMessage
The chat message to convert.
- idGenerator
- IIdGenerator
The ID generator for creating resource IDs.
- responseId
- String
The response ID for the CreatedBy field.
Returns
An enumerable collection of item resources.