Skip to content

100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.

feat(devpulse_ai): switch to Gemini API preference

STiFLeR7f26a05d2a7d8
diff --git a/advanced_ai_agents/multi_agent_apps/devpulse_ai/README.md b/advanced_ai_agents/multi_agent_apps/devpulse_ai/README.md
index bf210e1c..b115a256 100644
--- a/advanced_ai_agents/multi_agent_apps/devpulse_ai/README.md
+++ b/advanced_ai_agents/multi_agent_apps/devpulse_ai/README.md
@@ -69,10 +69,10 @@ cd advanced_ai_agents/multi_agent_apps/devpulse_ai
pip install -r requirements.txt
```
-1. Set your OpenAI API key (optional for live mode)
+1. Set your Gemini API key (optional for live mode)
```bash
-export OPENAI_API_KEY=your_api_key
+export GOOGLE_API_KEY=your_api_key
```
1. Run the verification script (no API key needed)
@@ -97,8 +97,8 @@ A modern, interactive dashboard is included to visualize the multi-agent pipelin
streamlit run streamlit_app.py
```
-2. Configure sources and signal counts in the sidebar.
-2. Provide an OpenAI API key (optional) to use full LLM intelligence.
+1. Configure sources and signal counts in the sidebar.
+2. Provide a Gemini API key (optional) to use full LLM intelligence.
3. View real-time progress as agents collaborate.
> **Note**: The default configuration is optimized for fast demo runs.
@@ -163,5 +163,5 @@ devpulse_ai/
### Built With
- [Agno](https://github.com/agno-agi/agno) - Multi-agent framework
-- [OpenAI GPT-4o-mini](https://openai.com/) - LLM backbone
+- [Google Gemini 1.5 Flash](https://ai.google.dev/) - LLM backbone
- [httpx](https://www.python-httpx.org/) - Async HTTP client
diff --git a/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/relevance_agent.py b/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/relevance_agent.py
index e4c7f71d..028df7e2 100644
--- a/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/relevance_agent.py
+++ b/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/relevance_agent.py
@@ -7,7 +7,7 @@ based on its relevance to AI/ML developers and engineers.
from typing import Dict, Any, Optional
from agno.agent import Agent
-from agno.models.openai import OpenAIChat
+from agno.models.google import Gemini
class RelevanceAgent:
@@ -20,17 +20,17 @@ class RelevanceAgent:
- Prioritize actionable, timely content
"""
- def __init__(self, model_id: str = "gpt-4o-mini"):
+ def __init__(self, model_id: str = "gemini-1.5-flash"):
"""
Initialize the Relevance Agent.
Args:
- model_id: OpenAI model to use for scoring.
+ model_id: Model ID to use for scoring.
"""
self.model_id = model_id
self.agent = Agent(
name="Relevance Scorer",
- model=OpenAIChat(id=model_id),
+ model=Gemini(id=model_id),
role="Scores technical signals based on developer relevance",
instructions=[
"Score each signal from 0-100 based on relevance.",
diff --git a/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/risk_agent.py b/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/risk_agent.py
index 135207af..e03ae59f 100644
--- a/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/risk_agent.py
+++ b/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/risk_agent.py
@@ -9,7 +9,7 @@ This agent analyzes signals for potential risks including:
from typing import Dict, Any, List
from agno.agent import Agent
-from agno.models.openai import OpenAIChat
+from agno.models.google import Gemini
class RiskAgent:
@@ -25,17 +25,17 @@ class RiskAgent:
RISK_LEVELS = ["LOW", "MEDIUM", "HIGH", "CRITICAL"]
- def __init__(self, model_id: str = "gpt-4o-mini"):
+ def __init__(self, model_id: str = "gemini-1.5-flash"):
"""
Initialize the Risk Agent.
Args:
- model_id: OpenAI model to use for risk assessment.
+ model_id: Model ID to use for risk assessment.
"""
self.model_id = model_id
self.agent = Agent(
name="Risk Assessor",
- model=OpenAIChat(id=model_id),
+ model=Gemini(id=model_id),
role="Assesses security and breaking change risks in technical signals",
instructions=[
"Analyze signals for security vulnerabilities.",
diff --git a/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/synthesis_agent.py b/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/synthesis_agent.py
index 4055e0e6..facffb80 100644
--- a/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/synthesis_agent.py
+++ b/advanced_ai_agents/multi_agent_apps/devpulse_ai/agents/synthesis_agent.py
@@ -7,7 +7,7 @@ a comprehensive, actionable intelligence summary for developers.
from typing import Dict, Any, List
from agno.agent import Agent
-from agno.models.openai import OpenAIChat
+from agno.models.google import Gemini
class SynthesisAgent:
@@ -21,17 +21,17 @@ class SynthesisAgent:
- Produce actionable recommendations
"""
- def __init__(self, model_id: str = "gpt-4o-mini"):
+ def __init__(self, model_id: str = "gemini-1.5-flash"):
"""
Initialize the Synthesis Agent.
Args:
- model_id: OpenAI model to use for synthesis.
+ model_id: Model ID to use for synthesis.
"""
self.model_id = model_id
self.agent = Agent(
name="Intelligence Synthesizer",
- model=OpenAIChat(id=model_id),
+ model=Gemini(id=model_id),
role="Synthesizes technical signals into actionable intelligence digests",
instructions=[
"Combine relevance scores and risk assessments.",
diff --git a/advanced_ai_agents/multi_agent_apps/devpulse_ai/main.py b/advanced_ai_agents/multi_agent_apps/devpulse_ai/main.py
index 275a67b5..a921659d 100644
--- a/advanced_ai_agents/multi_agent_apps/devpulse_ai/main.py
+++ b/advanced_ai_agents/multi_agent_apps/devpulse_ai/main.py
@@ -84,8 +84,8 @@ def run_pipeline():
print("=" * 60)
# Check for API key
- if not os.environ.get("OPENAI_API_KEY"):
- print("\n⚠️ Warning: OPENAI_API_KEY not set.")
+ if not os.environ.get("GOOGLE_API_KEY") and not os.environ.get("GEMINI_API_KEY"):
+ print("\n⚠️ Warning: GOOGLE_API_KEY not set.")
print(" LLM-based agents will use fallback heuristics.\n")
# Stage 1: Collection
diff --git a/advanced_ai_agents/multi_agent_apps/devpulse_ai/requirements.txt b/advanced_ai_agents/multi_agent_apps/devpulse_ai/requirements.txt
index 77fa6353..caba3d1f 100644
--- a/advanced_ai_agents/multi_agent_apps/devpulse_ai/requirements.txt
+++ b/advanced_ai_agents/multi_agent_apps/devpulse_ai/requirements.txt
@@ -3,3 +3,4 @@ httpx
openai
feedparser
streamlit>=1.30
+google-generativeai
diff --git a/advanced_ai_agents/multi_agent_apps/devpulse_ai/streamlit_app.py b/advanced_ai_agents/multi_agent_apps/devpulse_ai/streamlit_app.py
index acfee07a..dbe854c0 100644
--- a/advanced_ai_agents/multi_agent_apps/devpulse_ai/streamlit_app.py
+++ b/advanced_ai_agents/multi_agent_apps/devpulse_ai/streamlit_app.py
@@ -73,9 +73,10 @@ scores them for relevance, identifies potential risks, and synthesizes a final i
st.sidebar.header("⚙️ Pipeline Configuration")
# API Key
-api_key = st.sidebar.text_input("OpenAI API Key (optional)", type="password", help="If not provided, agents will use fallback heuristic logic.")
+api_key = st.sidebar.text_input("Gemini API Key (optional)", type="password", help="Provide a Google Gemini API key. If not provided, agents will use fallback heuristic logic.")
if api_key:
- os.environ["OPENAI_API_KEY"] = api_key
+ # Agno's GoogleGemini looks for GOOGLE_API_KEY
+ os.environ["GOOGLE_API_KEY"] = api_key
# Source Selection
sources = st.sidebar.multiselect(