Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Custom/Assistants/Streaming/RunStepDetailsUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public IReadOnlyList<RunStepUpdateCodeInterpreterOutput> CodeInterpreterOutputs
=> _asCodeCall?.CodeInterpreter?.Outputs;

/// <inheritdoc cref="InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Name"/>
public string FunctionName => _asFunctionCall.Function?.Name;
public string FunctionName => _asFunctionCall?.Function?.Name;

/// <inheritdoc cref="InternalRunStepDeltaStepDetailsToolCallsFunctionObjectFunction.Arguments"/>
public string FunctionArguments => _asFunctionCall?.Function?.Arguments;
Expand Down
6 changes: 6 additions & 0 deletions tests/Assistants/AssistantsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,12 @@
{
message += $"{contentUpdate.Text}";
}
else if (update is RunStepDetailsUpdate detailUpdate)
{
string? functionName = "none"; // expect null assignment on next line

Check warning on line 1020 in tests/Assistants/AssistantsTests.cs

View workflow job for this annotation

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
Assert.DoesNotThrow(() => functionName = detailUpdate.FunctionName);
Assert.Null(functionName);
}
}
}
else
Expand Down
Loading