AIContentExtensions extension
Extensions for working with collections of AIContent.
- @Source(name: 'AIContentExtensions.cs', namespace: 'Microsoft.Extensions.AI', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Abstractions/Contents/')
Methods
-
concatText(
) → String -
Available on Iterable<
Concatenates the text of all TextContent items.AIContent> , provided by the AIContentExtensions extension -
firstOfTypeOrNull<
T extends AIContent> () → T? -
Available on Iterable<
Returns the first item of typeAIContent> , provided by the AIContentExtensions extensionT, ornullif none exists. -
ofType<
T extends AIContent> () → Iterable< T> -
Available on Iterable<
Returns all items of typeAIContent> , provided by the AIContentExtensions extensionT.