10 writes to FinishReason
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatCompletion.cs (1)
146FinishReason = FinishReason,
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\StreamingChatCompletionUpdateTests.cs (2)
82update.FinishReason = ChatFinishReason.ContentFilter; 180FinishReason = ChatFinishReason.ContentFilter,
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
176FinishReason = finishReason, 237FinishReason = finishReason,
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
147FinishReason = ToFinishReason(chunk),
Microsoft.Extensions.AI.OpenAI (2)
OpenAIModelMappers.StreamingChatCompletion.cs (2)
93FinishReason = finishReason, 171FinishReason = finishReason,
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAISerializationTests.cs (1)
601FinishReason = i == 4 ? ChatFinishReason.Stop : null,
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
80FinishReason = ChatFinishReason.Stop,
14 references to FinishReason
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
93completion.FinishReason ??= update.FinishReason;
Microsoft.Extensions.AI.Abstractions.Tests (7)
ChatCompletion\ChatCompletionTests.cs (3)
224Assert.Equal(ChatFinishReason.ContentFilter, update0.FinishReason); 274Assert.Equal(ChatFinishReason.ContentFilter, update0.FinishReason); 285Assert.Equal(ChatFinishReason.ContentFilter, update1.FinishReason);
ChatCompletion\StreamingChatCompletionUpdateTests.cs (4)
25Assert.Null(update.FinishReason); 81Assert.Null(update.FinishReason); 83Assert.Equal(ChatFinishReason.ContentFilter, update.FinishReason); 211Assert.Equal(ChatFinishReason.ContentFilter, result.FinishReason);
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
AzureAIInferenceChatClientTests.cs (2)
241Assert.Equal(i < 10 ? null : ChatFinishReason.Stop, updates[i].FinishReason); 872Assert.Equal(i < 7 ? null : ChatFinishReason.ToolCalls, updates[i].FinishReason);
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
192Assert.Equal(i < updates.Count - 1 ? null : ChatFinishReason.Length, updates[i].FinishReason);
Microsoft.Extensions.AI.OpenAI (1)
OpenAIModelMappers.StreamingChatCompletion.cs (1)
53finishReason: ToOpenAIFinishReason(chatCompletionUpdate.FinishReason),
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (2)
277Assert.Equal(i < 10 ? null : ChatFinishReason.Stop, updates[i].FinishReason); 867Assert.Equal(i < 7 ? null : ChatFinishReason.ToolCalls, updates[i].FinishReason);