Skip to content

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

fix : files cleaned

priyanshm07f41c3582b9e1
diff --git a/ai_agent_tutorials/ai_breakup_recovery_agent/__pycache__/agents.cpython-39.pyc b/ai_agent_tutorials/ai_breakup_recovery_agent/__pycache__/agents.cpython-39.pyc
deleted file mode 100644
index dbe72c28..00000000
Binary files a/ai_agent_tutorials/ai_breakup_recovery_agent/__pycache__/agents.cpython-39.pyc and /dev/null differ
diff --git a/ai_agent_tutorials/ai_breakup_recovery_agent/__pycache__/image_input.cpython-39.pyc b/ai_agent_tutorials/ai_breakup_recovery_agent/__pycache__/image_input.cpython-39.pyc
deleted file mode 100644
index 67969857..00000000
Binary files a/ai_agent_tutorials/ai_breakup_recovery_agent/__pycache__/image_input.cpython-39.pyc and /dev/null differ
diff --git a/ai_agent_tutorials/ai_breakup_recovery_agent/agents.py b/ai_agent_tutorials/ai_breakup_recovery_agent/agents.py
index f9ff6e81..3e59ab9d 100644
--- a/ai_agent_tutorials/ai_breakup_recovery_agent/agents.py
+++ b/ai_agent_tutorials/ai_breakup_recovery_agent/agents.py
@@ -2,8 +2,6 @@ from agno.agent import Agent
from agno.team.team import Team
from agno.models.google import Gemini
from agno.tools.duckduckgo import DuckDuckGoTools
-from PIL import Image
-import easyocr
import os
# --- Therapist Agent ---
@@ -22,7 +20,7 @@ def create_therapist_agent():
api_key=os.environ.get("GEMINI_API_KEY")
),
tools=[DuckDuckGoTools()],
- add_datetime_to_instructions=True, # Add timestamp context
+ add_datetime_to_instructions=True,
show_tool_calls=True,
markdown=True
)
@@ -43,7 +41,7 @@ def create_closure_agent():
api_key=os.environ.get("GEMINI_API_KEY")
),
tools=[DuckDuckGoTools()],
- add_datetime_to_instructions=True, # Add timestamp context
+ add_datetime_to_instructions=True,
show_tool_calls=True,
markdown=True
)
@@ -85,7 +83,6 @@ def create_honesty_agent():
"Include reasons why the user should move on, based on the situation.",
"Format the output clearly with a header: **Brutal Honesty**",
],
- # model=Gemini(id="gemini-2.0-flash"),
model=Gemini(
id="gemini-2.0-flash",
api_key=os.environ.get("GEMINI_API_KEY")
@@ -96,23 +93,11 @@ def create_honesty_agent():
markdown=True
)
-
-# # --- Texts Analyzer Agent (Updated with easyocr) ---
-# def extract_text_with_easyocr(image):
-# """Extract text from image using EasyOCR."""
-# reader = easyocr.Reader(['en']) # Specify language
-# results = reader.readtext(image)
-
-# # Extract and combine text
-# extracted_text = " ".join([result[1] for result in results])
-# return extracted_text
-
# --- Team Leader (Breakup Recovery Team) ---
def create_breakup_team():
return Team(
name="Breakup Recovery Team",
mode="coordinate", # Team execution mode: coordinate or parallel
- # model=Gemini(id="gemini-2.0-flash"),
model=Gemini(
id="gemini-2.0-flash",
api_key=os.environ.get("GEMINI_API_KEY")
@@ -120,9 +105,8 @@ def create_breakup_team():
members=[
create_therapist_agent(),
create_closure_agent(),
- create_routine_agent(), # Added Routine Planner Agent
- create_honesty_agent(), # Added Brutal Honesty Agent
- # extract_text_with_easyocr()
+ create_routine_agent(),
+ create_honesty_agent(),
],
description="You are a team helping someone recover from a breakup.",
instructions=[
diff --git a/ai_agent_tutorials/ai_breakup_recovery_agent/image_input.py b/ai_agent_tutorials/ai_breakup_recovery_agent/image_input.py
index 05908be6..0075f0aa 100644
--- a/ai_agent_tutorials/ai_breakup_recovery_agent/image_input.py
+++ b/ai_agent_tutorials/ai_breakup_recovery_agent/image_input.py
@@ -3,7 +3,6 @@ from agno.media import Image
from agno.models.google import Gemini
from agno.tools.duckduckgo import DuckDuckGoTools
from PIL import Image as PILImage
-import base64
from io import BytesIO
import os
@@ -19,13 +18,6 @@ def load_image(image_data):
return img_bytes
-# # Check for Google API key
-# if "GOOGLE_API_KEY" not in os.environ:
-# raise EnvironmentError(
-# "Please set your GOOGLE_API_KEY environment variable. "
-# "You can get one from https://makersuite.google.com/app/apikey"
-# )
-
def create_chat_analysis_agent():
"""Creates a specialized agent for analyzing chat patterns"""
return Agent(
@@ -67,20 +59,4 @@ def analyze_chat_screenshot(image_data):
return response.content
except Exception as e:
- return f"Error analyzing chat screenshot: {str(e)}"
-
-# Example local image path - replace with your image path
-image_path = "breakup.jpg"
-
-try:
- # Load and process the image
- image_data = load_image(image_path)
-
- # Create the response using the agent
- agent.print_response(
- "Tell me about this image and give me the latest news about it.",
- images=[Image(content=image_data)],
- stream=True,
- )
-except Exception as e:
- print(f"Error processing image: {e}")
\ No newline at end of file
+ return f"Error analyzing chat screenshot: {str(e)}"
\ No newline at end of file