mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 10:42:39 +00:00
fix: toolgroups unregister
# What does this PR do? ## Test Plan
This commit is contained in:
parent
113f3a259c
commit
a27a576695
2 changed files with 13 additions and 1 deletions
|
@ -567,7 +567,7 @@ class ToolGroupsRoutingTable(CommonRoutingTableImpl, ToolGroups):
|
|||
tool_group = await self.get_tool_group(toolgroup_id)
|
||||
if tool_group is None:
|
||||
raise ValueError(f"Tool group {toolgroup_id} not found")
|
||||
tools = await self.list_tools(toolgroup_id).data
|
||||
tools = (await self.list_tools(toolgroup_id)).data
|
||||
for tool in tools:
|
||||
await self.unregister_object(tool)
|
||||
await self.unregister_object(tool_group)
|
||||
|
|
12
tests/integration/tools/test_tools.py
Normal file
12
tests/integration/tools/test_tools.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
|
||||
def test_toolsgroups_unregister(llama_stack_client):
|
||||
client = llama_stack_client
|
||||
client.toolgroups.unregister(
|
||||
toolgroup_id="builtin::websearch",
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue