I did configure the YouTube Channel RAG Search to work with gemini. Here is the code:
from crewai_tools import YoutubeChannelSearchTool
Initialize the tool with a specific YouTube channel handle
youtube_channel_tool = YoutubeChannelSearchTool(
config=dict(
llm=dict(
provider=“google”, # or google, openai, anthropic, llama2, …
config=dict(
model=“gemini/gemini-1.5-flash”,
),
),
embedder=dict(
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
),
),
),
youtube_channel_handle='@CircleCI-Videos',
)
But now everytime i try running the crew i get this error:
Running the Crew
C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Lib\site-packages\pydantic_internal_generate_schema.py:623: UserWarning: is not a Python type (it may be an instance of an object), Pydantic will allow any object with no validation since we cannot even enforce that the input is an instance of the given type. To get rid of this error wrap the type with pydantic.SkipValidation
.
warn(
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in run_code
File "C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Scripts\run_crew.exe_main.py", line 4, in
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent\src\multi_agent\main.py”, line 7, in
from multi_agent.crew import MultiAgent
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent\src\multi_agent\crew.py”, line 8, in
youtube_channel_tool = YoutubeChannelSearchTool(
^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Lib\site-packages\crewai_tools\tools\youtube_channel_search_tool\youtube_channel_search_tool.py”, line 32, in
init
super().init(**kwargs)
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Lib\site-packages\pydantic\main.py”, line 253, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Lib\site-packages\crewai_tools\tools\rag\rag_tool.py”, line 45, in set_default_adapter
app = App.from_config(config=self.config) if self.config else App()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Lib\site-packages\embedchain\app.py”, line 393, in from_config
llm = LlmFactory.create(llm_provider, llm_config_data.get(“config”, {}))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Lib\site-packages\embedchain\factory.py”, line 44, in create
llm_class = load_class(class_type)
^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Lib\site-packages\embedchain\factory.py”, line 6, in load_class
module = importlib.import_module(module_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AJIKA ANGELO\AppData\Local\Programs\Python\Python311\Lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\AJIKA ANGELO\Desktop\multi_agent.venv\Lib\site-packages\embedchain\llm\google.py”, line 9, in
raise ImportError(“GoogleLlm requires extra dependencies. Install with pip install google-generativeai
”) from None
ImportError: GoogleLlm requires extra dependencies. Install with pip install google-generativeai
An error occurred while running the crew: Command ‘[‘uv’, ‘run’, ‘run_crew’]’ returned non-zero exit status 1.
I went further an tried installing google-generativeai using pip but the error is still persistent