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)
220 references to AIContent
Aspire.Dashboard (1)
Microsoft.Extensions.AI (13)
Microsoft.Extensions.AI.Abstractions (65)
ChatCompletion\ChatResponseExtensions.cs (16)
52/// contiguous <see cref="AIContent"/> items where applicable, e.g. multiple
71/// <param name="filter">A predicate to filter which <see cref="AIContent"/> gets included in the message.</param>
78public static void AddMessages(this IList<ChatMessage> list, ChatResponseUpdate update, Func<AIContent, bool>? filter = null)
106/// contiguous <see cref="AIContent"/> items where applicable, e.g. multiple
129/// message boundaries, as well as coalescing contiguous <see cref="AIContent"/> items where applicable, e.g. multiple
157/// message boundaries, as well as coalescing contiguous <see cref="AIContent"/> items where applicable, e.g. multiple
183/// <summary>Coalesces sequential <see cref="AIContent"/> content elements.</summary>
184internal static void CoalesceTextContent(IList<AIContent> contents)
198static string MergeText(IList<AIContent> contents, int start, int end)
210IList<AIContent> contents,
213Func<IList<AIContent>, int, int, TContent> merge)
214where TContent : AIContent
253static bool TryAsCoalescable(AIContent content, [NotNullWhen(true)] out TContent? coalescable)
267if (contents is List<AIContent> contentsList)
299CoalesceTextContent((List<AIContent>)response.Messages[i].Contents);
366foreach (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)