-
Notifications
You must be signed in to change notification settings - Fork 498
Closed
Labels
Description
Describe the bug
Because the content is an empty string and not null or undefined, my tool doesn't get called.
Debug information
- node v22.16.0
- @openai/agents@npm:0.0.11 (via npm:^0.0.11
Repro steps
my LLM returns
message ={role: 'assistant', content: '', tool_calls: Array(1), tool_call_id: null, name: null}
and the completions mode in getRequest checks for
if (message.content !== undefined && message.content !== null) {
// evaluates to True and I get here even though I don't want to.
} else if (message.refusal) {
//bla
} else if (message.audio) {
// bla
} else if (message.tool_calls) {
// where I want to be
}Expected behavior
I would expect my tools to be called