from crewai_tools import YoutubeChannelSearchTool import os from dotenv import load_dotenv load_dotenv() yt_tool=YoutubeChannelSearchTool() def set_channel_handle(channel_handle=None): os.environ["GEMINI_API_KEY"]=os.getenv("GEMINI_API_KEY") config = dict( llm=dict( provider="google", config=dict( model="gemini-2.0-flash-exp" ), ), embedder=dict( provider="google", config=dict( model="gemini-2.0-flash-exp" ), ), ) global yt_tool # Create the tool with the given channel handle and configuration yt_tool=YoutubeChannelSearchTool( youtube_channel_handle=channel_handle, config=config ) return yt_tool