2 writes to Choices
Microsoft.Extensions.AI.Abstractions.Tests (2)
53 references to Choices
Microsoft.Extensions.AI (7)
Microsoft.Extensions.AI.Abstractions (13)
Microsoft.Extensions.AI.Abstractions.Tests (29)
ChatCompletion\ChatResponseTests.cs (14)
27Assert.Same(message, Assert.Single(response.Choices));
41Assert.Same(messages, response.Choices);
50Assert.Empty(response.Choices);
61Assert.Same(message, response.Choices[0]);
74Assert.Same(first, response.Choices[0]);
122Assert.Same(newChoices, response.Choices);
150Assert.Equal(4, result.Choices.Count);
152for (int i = 0; i < original.Choices.Count; i++)
154Assert.Equal(ChatRole.Assistant, result.Choices[i].Role);
155Assert.Equal($"Choice{i + 1}", result.Choices[i].Text);
179Assert.Equal(response.Choices[0].Text, response.ToString());
194response.Choices[0] + Environment.NewLine + Environment.NewLine +
197response.Choices[1] + Environment.NewLine + Environment.NewLine +
200response.Choices[2],
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (15)
74Assert.Equal(3, response.Choices.Count);
76ChatMessage message = response.Choices[0];
84message = response.Choices[1];
93message = response.Choices[2];
101Assert.Equal("Hello, world!", response.Choices[0].Text);
102Assert.Equal("Hey, you!", response.Choices[1].Text);
103Assert.Null(response.Choices[2].Text);
107Assert.Equal("Hello", response.Choices[0].Contents[0].ToString());
108Assert.Equal(", ", response.Choices[0].Contents[1].ToString());
109Assert.Equal("world!", response.Choices[0].Contents[2].ToString());
111Assert.Equal("Hey", response.Choices[1].Contents[0].ToString());
112Assert.Equal(", ", response.Choices[1].Contents[1].ToString());
113Assert.Equal("you!", response.Choices[1].Contents[2].ToString());
115Assert.Null(response.Choices[2].Text);
184Assert.Single(response.Choices);
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.AI.Tests (2)