mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-03 09:21:45 +00:00
Agents: Avoid calling tools that haven't been explicitly enabled
This commit is contained in:
parent
bae197c37e
commit
8119363e56
1 changed files with 1 additions and 1 deletions
|
@ -539,7 +539,7 @@ class ChatAgent(ShieldRunnerMixin):
|
|||
tool_call = message.tool_calls[0]
|
||||
|
||||
name = tool_call.tool_name
|
||||
if not isinstance(name, BuiltinTool):
|
||||
if not isinstance(name, BuiltinTool) or name not in enabled_tools:
|
||||
yield message
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue