13 writes to Annotations
Microsoft.Extensions.AI.Abstractions.Tests (10)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (10)
681new() { Contents = [new TextContent("D") { Annotations = [new()] }] }, 682new() { Contents = [new TextContent("E") { Annotations = [new()] }] }, 683new() { Contents = [new TextContent("F") { Annotations = [new()] }] }, 684new() { Contents = [new TextContent("G") { Annotations = [] }] }, 685new() { Contents = [new TextContent("H") { Annotations = [] }] }, 686new() { Contents = [new TextContent("I") { Annotations = [new()] }] }, 687new() { Contents = [new TextContent("J") { Annotations = [new()] }] }, 689new() { Contents = [new TextContent("L") { Annotations = [new()] }] }, 692new() { Contents = [new TextContent("O") { Annotations = [new()] }] }, 693new() { Contents = [new TextContent("P") { Annotations = [new()] }] },
Microsoft.Extensions.AI.OpenAI (3)
OpenAIAssistantsChatClient.cs (1)
287(((TextContent)textUpdate.Contents[0]).Annotations ??= []).Add(new CitationAnnotation
OpenAIChatClient.cs (1)
524(annotationContent.Annotations ??= []).Add(new CitationAnnotation
OpenAIResponsesChatClient.cs (1)
1161(destination.Annotations ??= []).Add(ca);
8 references to Annotations
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatResponseExtensions.cs (1)
385if (content is TContent tmp && tmp.Annotations is not { Count: > 0 })
Microsoft.Extensions.AI.OpenAI (2)
MicrosoftExtensionsAIChatExtensions.cs (2)
94if (content.Annotations is null) 99foreach (var annotation in content.Annotations)
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAIResponseClientIntegrationTests.cs (3)
80Assert.NotNull(tc.Annotations); 81Assert.NotEmpty(tc.Annotations); 82Assert.All(tc.Annotations, a =>
OpenAIResponseClientTests.cs (2)
4563var annotatedUpdate = updates.FirstOrDefault(u => u.Contents.Any(c => c.Annotations?.Count > 0)); 4565Assert.NotEmpty(annotatedUpdate.Contents.First().Annotations!);