100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
New project with gemini thinking
Madhu64d4052e10b8
diff --git a/ai_agent_tutorials/ai_gemini_thinking_agent/README.md b/ai_agent_tutorials/ai_gemini_thinking_agent/README.mdnew file mode 100644index 00000000..e69de29bdiff --git a/ai_agent_tutorials/ai_gemini_thinking_agent/main.py b/ai_agent_tutorials/ai_gemini_thinking_agent/main.pynew file mode 100644index 00000000..35995c9e--- /dev/null+++ b/ai_agent_tutorials/ai_gemini_thinking_agent/main.py@@ -0,0 +1,20 @@+from agno.agent import Agent+from agno.models.openai import OpenAIChat+from agno.models.google import Gemini+from agno.tools.duckduckgo import DuckDuckGoTools+from agno.tools.yfinance import YFinanceTools+import os+from dotenv import load_dotenv+load_dotenv()++thinking_agent = Agent(+ name="Thinking Agent",+ role="Think about the problem",+ model=Gemini(id="gemini-2.0-flash-thinking-exp-1219", api_key=os.getenv("GOOGLE_API_KEY")),+ instructions="Given the problem, think about it and provide a detailed explanation",+ show_tool_calls=True,+ markdown=True,+)+++thinking_agent.print_response("Explain Deep Q Networks from first principles", stream=True)\ No newline at end of filediff --git a/ai_agent_tutorials/ai_gemini_thinking_agent/requirements.txt b/ai_agent_tutorials/ai_gemini_thinking_agent/requirements.txtnew file mode 100644index 00000000..e69de29bdiff --git a/ai_agent_tutorials/ai_gemini_thinking_agent/test.py b/ai_agent_tutorials/ai_gemini_thinking_agent/test.pynew file mode 100644index 00000000..9149e46c--- /dev/null+++ b/ai_agent_tutorials/ai_gemini_thinking_agent/test.py@@ -0,0 +1,22 @@+from google import genai+import os+from dotenv import load_dotenv+load_dotenv()++client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"), http_options={'api_version':'v1alpha'})++import asyncio++config = {'thinking_config': {'include_thoughts': True}}++async def main():+ chat = client.aio.chats.create(+ model='gemini-2.0-flash-thinking-exp',+ config=config+ )+ response = await chat.send_message('What is your name?')+ print(response.text)+ response = await chat.send_message('What did you just say before this?')+ print(response.text)++asyncio.run(main())\ No newline at end of file