fixed scoping issue causing error in RAG tools

This commit is contained in:
Mike Sorensen
2024-09-23 22:18:22 -05:00
parent a04d98f62f
commit 1cc8966e2e
15 changed files with 19 additions and 19 deletions

View File

@@ -31,6 +31,7 @@ class MDXSearchTool(RagTool):
def __init__(self, mdx: Optional[str] = None, **kwargs):
super().__init__(**kwargs)
if mdx is not None:
kwargs["data_type"] = DataType.MDX
self.add(mdx)
self.description = f"A tool that can be used to semantic search a query the {mdx} MDX's content."
self.args_schema = FixedMDXSearchToolSchema
@@ -41,7 +42,6 @@ class MDXSearchTool(RagTool):
*args: Any,
**kwargs: Any,
) -> None:
kwargs["data_type"] = DataType.MDX
super().add(*args, **kwargs)
def _before_run(