mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 04:00:42 +00:00
chore: Rename RagTool FileSearchTool
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
4566eebe05
commit
2d9163529a
288 changed files with 16985 additions and 2071 deletions
|
|
@ -197,14 +197,14 @@ def _get_defining_class(member_fn: str, derived_cls: type) -> type:
|
|||
"Find the class in which a member function is first defined in a class inheritance hierarchy."
|
||||
|
||||
# This import must be dynamic here
|
||||
from llama_stack.apis.tools import RAGToolRuntime, ToolRuntime
|
||||
from llama_stack.apis.tools import FileSearchToolRuntime, ToolRuntime
|
||||
|
||||
# iterate in reverse member resolution order to find most specific class first
|
||||
for cls in reversed(inspect.getmro(derived_cls)):
|
||||
for name, _ in inspect.getmembers(cls, inspect.isfunction):
|
||||
if name == member_fn:
|
||||
# HACK ALERT
|
||||
if cls == RAGToolRuntime:
|
||||
if cls == FileSearchToolRuntime:
|
||||
return ToolRuntime
|
||||
return cls
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue