Skip to content

Commit 7fbfef6

Browse files
committed
fix: Remove tools param when empty
1 parent 4a0fe86 commit 7fbfef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/agents-openai/src/openaiChatCompletionsModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export class OpenAIChatCompletionsModel implements Model {
260260
const requestData = {
261261
model: this.#model,
262262
messages,
263-
tools,
263+
tools: tools.length ? tools : undefined,
264264
temperature: request.modelSettings.temperature,
265265
top_p: request.modelSettings.topP,
266266
frequency_penalty: request.modelSettings.frequencyPenalty,

0 commit comments

Comments
 (0)