Skip to content

Commit 1c98d22

Browse files
committed
fix: return False on uncaught has_tool_calls if condition and None for get_tool_calls
Signed-off-by: Casper Nielsen <[email protected]>
1 parent e54ea1c commit 1c98d22

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dapr_agents/types/message.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ def get_tool_calls(self) -> Optional[List[ToolCall]]:
240240
return self.tool_calls
241241
if isinstance(self.tool_calls, ToolCall):
242242
return [self.tool_calls]
243+
return None
243244

244245
def has_tool_calls(self) -> bool:
245246
"""
@@ -251,6 +252,7 @@ def has_tool_calls(self) -> bool:
251252
return True
252253
if isinstance(self.tool_calls, ToolCall):
253254
return True
255+
return False
254256

255257

256258
class ToolMessage(BaseMessage):

0 commit comments

Comments
 (0)