chore: Rename RagTool FileSearchTool

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-10-24 16:52:58 -04:00
parent 4566eebe05
commit 2d9163529a
288 changed files with 16985 additions and 2071 deletions

View file

@ -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