7 writes to Contents
Microsoft.Extensions.AI.Abstractions (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.SpeechToTextResponse.g.cs (1)
202Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Contents = value!,
Microsoft.Extensions.AI.Abstractions.Tests (4)
Generated\361d1da7f942c932\TestJsonSerializerContext.SpeechToTextResponse.g.cs (1)
200Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Contents = value!,
SpeechToText\SpeechToTextResponseTests.cs (3)
134response.Contents = newContents; 148Contents = 208Contents =
Microsoft.Extensions.AI.OpenAI (2)
OpenAISpeechToTextClient.cs (2)
69response.Contents = [new TextContent(translation.Text)]; 83response.Contents = [new TextContent(transcription.Text)];
32 references to Contents
Microsoft.Extensions.AI (1)
SpeechToText\OpenTelemetrySpeechToTextClient.cs (1)
350OtelMessageSerializer.SerializeChatMessages([new(ChatRole.Assistant, response.Contents)]));
Microsoft.Extensions.AI.Abstractions (6)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.SpeechToTextResponse.g.cs (1)
201Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Contents,
SpeechToText\SpeechToTextResponse.cs (2)
66/// This property concatenates the text of all <see cref="TextContent"/> objects in <see cref="Contents"/>. 78IList<AIContent> contents = Contents;
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (3)
34ChatResponseExtensions.CoalesceContent((List<AIContent>)response.Contents); 60ChatResponseExtensions.CoalesceContent((List<AIContent>)response.Contents); 105response.Contents.Add(content);
Microsoft.Extensions.AI.Abstractions.Tests (25)
Generated\361d1da7f942c932\TestJsonSerializerContext.SpeechToTextResponse.g.cs (1)
199Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Contents,
SpeechToText\SpeechToTextResponseTests.cs (21)
24Assert.Empty(response.Contents); 26Assert.NotNull(response.Contents); 27Assert.Same(response.Contents, response.Contents); 28Assert.Empty(response.Contents); 44Assert.Same(response.Contents, response.Contents); 47Assert.Empty(response.Contents); 51Assert.Single(response.Contents); 52TextContent tc = Assert.IsType<TextContent>(response.Contents[0]); 81Assert.Same(response.Contents, response.Contents); 84Assert.Empty(response.Contents); 89Assert.Equal(contentCount, response.Contents.Count); 92TextContent tc = Assert.IsType<TextContent>(response.Contents[i]); 135Assert.Same(newContents, response.Contents); 169Assert.Equal(4, result.Contents.Count); 171for (int i = 0; i < original.Contents.Count; i++) 173Assert.Equal($"Text{i + 1}", ((TextContent)result.Contents[i]).Text); 285Assert.Single(result.Contents); 286var textContent = Assert.IsType<TextContent>(result.Contents[0]);
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (3)
124Assert.Equal(expected.Count + (gapLength * ((numSequences - 1) + (gapBeginningEnd ? 2 : 0))), response.Contents.Count); 126TextContent[] contents = response.Contents.OfType<TextContent>().ToArray(); 153Assert.Equal("Hello, world!", Assert.IsType<TextContent>(Assert.Single(response.Contents)).Text);