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)
219 references to AIContent
Microsoft.Extensions.AI (13)
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)
213IList<AIContent> contents,
216Func<IList<AIContent>, int, int, TContent> merge)
217where TContent : AIContent
256static bool TryAsCoalescable(AIContent content, [NotNullWhen(true)] out TContent? coalescable)
270if (contents is List<AIContent> contentsList)
302CoalesceTextContent((List<AIContent>)response.Messages[i].Contents);
369foreach (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)