13 types derived from AIContent
Microsoft.Extensions.AI.Abstractions (10)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Tests (2)
6 instantiations of AIContent
Microsoft.Extensions.AI.Abstractions.Tests (3)
Microsoft.Extensions.AI.OpenAI (3)
201 references to AIContent
Microsoft.Extensions.AI (5)
Microsoft.Extensions.AI.Abstractions (64)
ChatCompletion\ChatResponseExtensions.cs (16)
55/// contiguous <see cref="AIContent"/> items where applicable, e.g. multiple
74/// <param name="filter">A predicate to filter which <see cref="AIContent"/> gets included in the message.</param>
81public static void AddMessages(this IList<ChatMessage> list, ChatResponseUpdate update, Func<AIContent, bool>? filter = null)
109/// contiguous <see cref="AIContent"/> items where applicable, e.g. multiple
132/// message boundaries, as well as coalescing contiguous <see cref="AIContent"/> items where applicable, e.g. multiple
160/// message boundaries, as well as coalescing contiguous <see cref="AIContent"/> items where applicable, e.g. multiple
186/// <summary>Coalesces sequential <see cref="AIContent"/> content elements.</summary>
187internal static void CoalesceTextContent(IList<AIContent> contents)
201static string MergeText(IList<AIContent> contents, int start, int end)
212static void Coalesce<TContent>(IList<AIContent> contents, bool mergeSingle, Func<IList<AIContent>, int, int, TContent> merge)
213where TContent : AIContent
250static bool TryAsCoalescable(AIContent content, [NotNullWhen(true)] out TContent? coalescable)
264if (contents is List<AIContent> contentsList)
296CoalesceTextContent((List<AIContent>)response.Messages[i].Contents);
357foreach (var content in update.Contents)
Microsoft.Extensions.AI.Abstractions.Tests (31)
Microsoft.Extensions.AI.AzureAIInference (5)
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
Microsoft.Extensions.AI.Evaluation (14)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Evaluation.Reporting (5)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (5)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (8)
Microsoft.Extensions.AI.Evaluation.Safety (5)
Microsoft.Extensions.AI.Integration.Tests (6)
Microsoft.Extensions.AI.OpenAI (38)
Microsoft.Extensions.AI.Tests (12)