Skip to content

Commit 5ed9e75

Browse files
authored
chore(langchain): add a more falsy check for tool_calls output parser (#8634)
1 parent 68ebd0c commit 5ed9e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

langchain/src/agents/tool_calling/output_parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function parseAIMessageToToolAction(
3333
toolCalls = message.tool_calls;
3434
} else {
3535
if (
36-
message.additional_kwargs.tool_calls === undefined ||
36+
!message.additional_kwargs.tool_calls ||
3737
message.additional_kwargs.tool_calls.length === 0
3838
) {
3939
return {

0 commit comments

Comments
 (0)