7 writes to Contents
Microsoft.Extensions.AI.Abstractions (2)
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
50response.Contents = contents; 96response.Contents = contents;
Microsoft.Extensions.AI.Abstractions.Tests (3)
SpeechToText\SpeechToTextResponseTests.cs (3)
133response.Contents = newContents; 142Contents = 194Contents =
Microsoft.Extensions.AI.OpenAI (2)
OpenAISpeechToTextClient.cs (2)
171response.Contents = [new TextContent(audioTranscription.Text)]; 239response.Contents = [new TextContent(audioTranslation.Text)];
23 references to Contents
Microsoft.Extensions.AI.Abstractions (2)
SpeechToText\SpeechToTextResponse.cs (2)
67/// This property concatenates the text of all <see cref="TextContent"/> objects in <see cref="Contents"/>. 81Contents = Contents,
Microsoft.Extensions.AI.Abstractions.Tests (21)
SpeechToText\SpeechToTextResponseTests.cs (19)
24Assert.Empty(response.Contents); 26Assert.NotNull(response.Contents); 27Assert.Same(response.Contents, response.Contents); 28Assert.Empty(response.Contents); 43Assert.Same(response.Contents, response.Contents); 46Assert.Empty(response.Contents); 50Assert.Single(response.Contents); 51TextContent tc = Assert.IsType<TextContent>(response.Contents[0]); 80Assert.Same(response.Contents, response.Contents); 83Assert.Empty(response.Contents); 88Assert.Equal(contentCount, response.Contents.Count); 91TextContent tc = Assert.IsType<TextContent>(response.Contents[i]); 134Assert.Same(newContents, response.Contents); 162Assert.Equal(4, result.Contents.Count); 164for (int i = 0; i < original.Contents.Count; i++) 166Assert.Equal($"Text{i + 1}", ((TextContent)result.Contents[i]).Text);
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (2)
122Assert.Equal(expected.Count + (gapLength * ((numSequences - 1) + (gapBeginningEnd ? 2 : 0))), response.Contents.Count); 124TextContent[] contents = response.Contents.OfType<TextContent>().ToArray();