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

@@ -33,6 +33,7 @@ class YoutubeChannelSearchTool(RagTool):
def __init__(self, youtube_channel_handle: Optional[str] = None, **kwargs):
super().__init__(**kwargs)
if youtube_channel_handle is not None:
kwargs["data_type"] = DataType.YOUTUBE_CHANNEL
self.add(youtube_channel_handle)
self.description = f"A tool that can be used to semantic search a query the {youtube_channel_handle} Youtube Channels content."
self.args_schema = FixedYoutubeChannelSearchToolSchema
@@ -45,8 +46,6 @@ class YoutubeChannelSearchTool(RagTool):
) -> None:
if not youtube_channel_handle.startswith("@"):
youtube_channel_handle = f"@{youtube_channel_handle}"
kwargs["data_type"] = DataType.YOUTUBE_CHANNEL
super().add(youtube_channel_handle, **kwargs)
def _before_run(