mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
feat(api)!: deprecate toolgroup and tool_runtime apis (#4249)
# What does this PR do? marks `toolgroup` and `tool_runtime` APIs for deprecation <!-- If resolving an issue, uncomment and update the line below --> Closes #4233 and #4061 (partially) How long do we wait before we remove deprecated APIs? ## Test Plan <!-- Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.* --> Signed-off-by: Jaideep Rao <jrao@redhat.com>
This commit is contained in:
parent
618c03405c
commit
89807dc117
5 changed files with 175 additions and 234 deletions
|
|
@ -126,7 +126,7 @@ class ToolGroups(Protocol):
|
|||
"""
|
||||
...
|
||||
|
||||
@webmethod(route="/toolgroups/{toolgroup_id:path}", method="GET", level=LLAMA_STACK_API_V1)
|
||||
@webmethod(route="/toolgroups/{toolgroup_id:path}", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
||||
async def get_tool_group(
|
||||
self,
|
||||
toolgroup_id: str,
|
||||
|
|
@ -138,7 +138,7 @@ class ToolGroups(Protocol):
|
|||
"""
|
||||
...
|
||||
|
||||
@webmethod(route="/toolgroups", method="GET", level=LLAMA_STACK_API_V1)
|
||||
@webmethod(route="/toolgroups", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
||||
async def list_tool_groups(self) -> ListToolGroupsResponse:
|
||||
"""List tool groups with optional provider.
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ class ToolGroups(Protocol):
|
|||
"""
|
||||
...
|
||||
|
||||
@webmethod(route="/tools", method="GET", level=LLAMA_STACK_API_V1)
|
||||
@webmethod(route="/tools", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
||||
async def list_tools(self, toolgroup_id: str | None = None) -> ListToolDefsResponse:
|
||||
"""List tools with optional tool group.
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ class ToolGroups(Protocol):
|
|||
"""
|
||||
...
|
||||
|
||||
@webmethod(route="/tools/{tool_name:path}", method="GET", level=LLAMA_STACK_API_V1)
|
||||
@webmethod(route="/tools/{tool_name:path}", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
||||
async def get_tool(
|
||||
self,
|
||||
tool_name: str,
|
||||
|
|
@ -193,7 +193,7 @@ class ToolRuntime(Protocol):
|
|||
tool_store: ToolStore | None = None
|
||||
|
||||
# TODO: This needs to be renamed once OPEN API generator name conflict issue is fixed.
|
||||
@webmethod(route="/tool-runtime/list-tools", method="GET", level=LLAMA_STACK_API_V1)
|
||||
@webmethod(route="/tool-runtime/list-tools", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
||||
async def list_runtime_tools(
|
||||
self,
|
||||
tool_group_id: str | None = None,
|
||||
|
|
@ -209,7 +209,7 @@ class ToolRuntime(Protocol):
|
|||
"""
|
||||
...
|
||||
|
||||
@webmethod(route="/tool-runtime/invoke", method="POST", level=LLAMA_STACK_API_V1)
|
||||
@webmethod(route="/tool-runtime/invoke", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
||||
async def invoke_tool(
|
||||
self,
|
||||
tool_name: str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue