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 CodeDocsSearchTool(RagTool):
def __init__(self, docs_url: Optional[str] = None, **kwargs):
super().__init__(**kwargs)
if docs_url is not None:
kwargs["data_type"] = DataType.DOCS_SITE
self.add(docs_url)
self.description = f"A tool that can be used to semantic search a query the {docs_url} Code Docs content."
self.args_schema = FixedCodeDocsSearchToolSchema
@@ -41,7 +42,6 @@ class CodeDocsSearchTool(RagTool):
*args: Any,
**kwargs: Any,
) -> None:
kwargs["data_type"] = DataType.DOCS_SITE
super().add(*args, **kwargs)
def _before_run(