6 writes to FinishReason
Microsoft.Extensions.AI (1)
ChatCompletion\ChatCompletion{T}.cs (1)
40FinishReason = completion.FinishReason;
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
93completion.FinishReason ??= update.FinishReason;
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\ChatCompletionTests.cs (2)
102completion.FinishReason = ChatFinishReason.ContentFilter; 212FinishReason = ChatFinishReason.ContentFilter,
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
140FinishReason = ToFinishReason(response.FinishReason),
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAISerializationTests.cs (1)
457FinishReason = ChatFinishReason.Stop,
15 references to FinishReason
Microsoft.Extensions.AI (3)
ChatCompletion\ChatCompletion{T}.cs (1)
40FinishReason = completion.FinishReason;
ChatCompletion\OpenTelemetryChatClient.cs (2)
366if (completion.FinishReason is ChatFinishReason finishReason) 488FinishReason = completion.FinishReason?.Value ?? "error",
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatCompletion.cs (1)
146FinishReason = FinishReason,
Microsoft.Extensions.AI.Abstractions.Tests (3)
ChatCompletion\ChatCompletionTests.cs (3)
101Assert.Null(completion.FinishReason); 103Assert.Equal(ChatFinishReason.ContentFilter, completion.FinishReason); 161Assert.Equal(ChatFinishReason.ContentFilter, result.FinishReason);
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
AzureAIInferenceChatClientTests.cs (2)
166Assert.Equal(ChatFinishReason.Stop, response.FinishReason); 664Assert.Equal(ChatFinishReason.Stop, response.FinishReason);
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
125Assert.Equal(ChatFinishReason.Length, response.FinishReason);
Microsoft.Extensions.AI.OpenAI (1)
OpenAIModelMapper.ChatCompletion.cs (1)
61finishReason: ToOpenAIFinishReason(chatCompletion.FinishReason),
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIChatClientTests.cs (4)
196Assert.Equal(ChatFinishReason.Stop, response.FinishReason); 543Assert.Equal(ChatFinishReason.Stop, response.FinishReason); 642Assert.Equal(ChatFinishReason.Stop, response.FinishReason); 1013Assert.Equal(ChatFinishReason.Stop, response.FinishReason);