17 types derived from AIContent
Microsoft.Extensions.AI.Abstractions (14)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Tests (2)
7 instantiations of AIContent
Microsoft.Extensions.AI.Abstractions.Tests (3)
Microsoft.Extensions.AI.OpenAI (4)
218 references to AIContent
Microsoft.Extensions.AI (12)
Microsoft.Extensions.AI.Abstractions (65)
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);
363foreach (var content in update.Contents)
Microsoft.Extensions.AI.Abstractions.Tests (34)
Microsoft.Extensions.AI.AzureAIInference (5)
Microsoft.Extensions.AI.AzureAIInference.Tests (4)
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 (42)
Microsoft.Extensions.AI.OpenAI.Tests (2)
Microsoft.Extensions.AI.Tests (10)