Skip to content

Commit dc7f318

Browse files
authored
Fix ArgumentNullException in CodeInterpreterToolContainerConfiguration.CreateAutomaticContainerConfiguration (#715)
1 parent 08a1193 commit dc7f318

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Custom/Responses/Tools/CodeInterpreterToolContainerConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public static AutomaticCodeInterpreterToolContainerConfiguration CreateAutomatic
2020
return new AutomaticCodeInterpreterToolContainerConfiguration(
2121
kind: InternalCodeInterpreterContainerConfigurationType.Auto,
2222
additionalBinaryDataProperties: null,
23-
fileIds: fileIds.ToList());
23+
fileIds: fileIds?.ToList());
2424
}
2525
}

tests/Responses/ResponsesToolTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public async Task CodeInterpreterToolWithoutFileIds()
403403
{
404404
OpenAIResponseClient client = GetTestClient();
405405

406-
ResponseTool codeInterpreterTool = ResponseTool.CreateCodeInterpreterTool(new CodeInterpreterToolContainer(new AutomaticCodeInterpreterToolContainerConfiguration()));
406+
ResponseTool codeInterpreterTool = ResponseTool.CreateCodeInterpreterTool(new CodeInterpreterToolContainer(CodeInterpreterToolContainerConfiguration.CreateAutomaticContainerConfiguration()));
407407
ResponseCreationOptions responseOptions = new()
408408
{
409409
Tools = { codeInterpreterTool },

0 commit comments

Comments
 (0)