Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.1.0 #6

Merged
merged 4 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/routes/playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from agents.research import get_research_agent
from agents.web_search import get_web_search_agent
from agents.simple_agent import get_simple_agent

# Import workflows
from workflows.blog_post_generator import get_blog_post_generator
from workflows.investment_report_generator import get_investment_report_generator
Expand All @@ -26,7 +27,7 @@

# Create a playground instance
playground = Playground(
agents=[simple_agent,web_search_agent, research_agent, finance_agent],
agents=[simple_agent, web_search_agent, research_agent, finance_agent],
workflows=[blog_post_generator, investment_report_generator, startup_idea_validator],
)
# Log the playground endpoint with phidata.app
Expand Down
1 change: 1 addition & 0 deletions api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def set_cors_origin_list(cls, cors_origin_list, info: FieldValidationInfo):
"http://localhost:3000",
"https://app.agno.com",
"https://app-stg.agno.com",
# Add more here if you are not hosting on localhost
]
)

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ authors = [{ name = "Agno Team", email = "[email protected]" }]

dependencies = [
"agno-aws==0.0.1",
"agno==1.0.8",
"agno-docker==0.0.1",
"agno==1.1.0",
"alembic",
"beautifulsoup4",
"duckdb",
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# This file was autogenerated by uv via the following command:
# ./scripts/generate_requirements.sh
agno==1.0.8
agno==1.1.0
agno-aws==0.0.1
agno-docker==0.0.1
alembic==1.14.1
annotated-types==0.7.0
anyio==4.8.0
Expand All @@ -13,6 +14,7 @@ charset-normalizer==3.4.1
click==8.1.8
distro==1.9.0
dnspython==2.7.0
docker==7.1.0
docstring-parser==0.16
duckdb==1.1.3
duckduckgo-search==7.3.0
Expand Down
5 changes: 3 additions & 2 deletions workflows/blog_post_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class BlogPostGenerator(Workflow):
markdown=True,
)

def run(
def run( # type: ignore
self,
topic: str,
use_search_cache: bool = True,
Expand Down Expand Up @@ -243,7 +243,8 @@ def run(
yield from self.writer.run(json.dumps(writer_input, indent=4), stream=True)

# Save the blog post in the cache
self.add_blog_post_to_cache(topic, self.writer.run_response.content)
if self.writer.run_response:
self.add_blog_post_to_cache(topic, str(self.writer.run_response.content))

def get_cached_blog_post(self, topic: str) -> Optional[str]:
logger.info("Checking if cached blog post exists")
Expand Down
2 changes: 1 addition & 1 deletion workflows/investment_report_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class InvestmentReportGenerator(Workflow):
"""),
)

def run(self, companies: str) -> Iterator[RunResponse]:
def run(self, companies: str) -> Iterator[RunResponse]: # type: ignore
logger.info(f"Getting investment reports for companies: {companies}")
initial_report: RunResponse = self.stock_analyst.run(companies)
if initial_report is None or not initial_report.content:
Expand Down
8 changes: 4 additions & 4 deletions workflows/startup_idea_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.storage.workflow.postgres import PostgresWorkflowStorage
from agno.tools.googlesearch import GoogleSearch
from agno.tools.googlesearch import GoogleSearchTools
from agno.utils.log import logger
from agno.workflow import RunEvent, RunResponse, Workflow
from pydantic import BaseModel, Field
Expand Down Expand Up @@ -43,7 +43,7 @@ class StartupIdeaValidator(Workflow):

market_research_agent: Agent = Agent(
model=OpenAIChat(id=workflow_settings.gpt_4_mini),
tools=[GoogleSearch()],
tools=[GoogleSearchTools()],
instructions=[
"You are provided with a startup idea and the company's mission and objectives. ",
"Estimate the total addressable market (TAM), serviceable available market (SAM), and serviceable obtainable market (SOM). ",
Expand All @@ -59,7 +59,7 @@ class StartupIdeaValidator(Workflow):

competitor_analysis_agent: Agent = Agent(
model=OpenAIChat(id=workflow_settings.gpt_4_mini),
tools=[GoogleSearch()],
tools=[GoogleSearchTools()],
instructions=[
"You are provided with a startup idea and some market research related to the idea. ",
"Identify existing competitors in the market. ",
Expand Down Expand Up @@ -142,7 +142,7 @@ def get_competitor_analysis(self, startup_idea: str, market_research: MarketRese

return None

def run(self, startup_idea: str) -> Iterator[RunResponse]:
def run(self, startup_idea: str) -> Iterator[RunResponse]: # type: ignore
logger.info(f"Generating a startup validation report for: {startup_idea}")

# Clarify and quantify the idea
Expand Down