mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-13 05:17:26 +00:00
fix: Raise exception when tool call result is None
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
parent
1bd080c23d
commit
f6a0c3e97d
1 changed files with 4 additions and 0 deletions
|
@ -804,6 +804,10 @@ class ChatAgent(ShieldRunnerMixin):
|
||||||
toolgroup_args,
|
toolgroup_args,
|
||||||
tool_to_group,
|
tool_to_group,
|
||||||
)
|
)
|
||||||
|
if tool_result.content is None:
|
||||||
|
raise ValueError(
|
||||||
|
f"Tool call result (id: {tool_call.call_id}, name: {tool_call.tool_name}) does not have any content"
|
||||||
|
)
|
||||||
result_messages = [
|
result_messages = [
|
||||||
ToolResponseMessage(
|
ToolResponseMessage(
|
||||||
call_id=tool_call.call_id,
|
call_id=tool_call.call_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue