fis: prevent assigning a nullable variable to a non-nullable property

This commit is contained in:
SergeyMenshykh
2024-09-03 15:25:31 +01:00
parent ef2b8f3310
commit 1ab6f956d8
2 changed files with 8 additions and 2 deletions
@@ -55,7 +55,10 @@ internal partial class AzureClientCore
options.ResponseFormat = responseFormat;
}
options.ToolChoice = toolCallingConfig.Choice;
if (toolCallingConfig.Choice is not null)
{
options.ToolChoice = toolCallingConfig.Choice;
}
if (toolCallingConfig.Tools is { Count: > 0 } tools)
{
@@ -655,7 +655,10 @@ internal partial class ClientCore
options.ResponseFormat = responseFormat;
}
options.ToolChoice = toolCallingConfig.Choice;
if (toolCallingConfig.Choice is not null)
{
options.ToolChoice = toolCallingConfig.Choice;
}
if (toolCallingConfig.Tools is { Count: > 0 } tools)
{