Skip to content

Commit 01bc383

Browse files
committed
Fix minor warning in a test
1 parent 35184a9 commit 01bc383

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/AI.Tests/OpenAIResponseClientExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ public override Task<ClientResult<OpenAIResponse>> CreateResponseAsync(IEnumerab
2424
public override AsyncCollectionResult<StreamingResponseUpdate> CreateResponseStreamingAsync(IEnumerable<ResponseItem> inputItems, ResponseCreationOptions? options = null, CancellationToken cancellationToken = default)
2525
=> inner.CreateResponseStreamingAsync(inputItems, AddTools(options), cancellationToken);
2626

27-
ResponseCreationOptions AddTools(ResponseCreationOptions options)
27+
ResponseCreationOptions? AddTools(ResponseCreationOptions? options)
2828
{
29+
if (options == null)
30+
return null;
31+
2932
foreach (var tool in tools)
3033
options.Tools.Add(tool);
3134

0 commit comments

Comments
 (0)