-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Escape markdown tags from print_response
- Loading branch information
1 parent
a02d2af
commit 00925a1
Showing
7 changed files
with
100 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tmp |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from agno.agent import Agent | ||
from agno.models.groq import Groq | ||
|
||
agent = Agent(model=Groq(id="deepseek-r1-distill-llama-70b-specdec"), markdown=True) | ||
|
||
# Print the response on the terminal | ||
agent.print_response("Share a 2 sentence horror story") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from agno.agent import Agent | ||
from agno.models.groq import Groq | ||
|
||
agent = Agent(model=Groq(id="deepseek-r1-distill-llama-70b-specdec"), markdown=True) | ||
|
||
# Print the response on the terminal | ||
agent.print_response("Share a 2 sentence horror story", stream=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from agno.agent import Agent | ||
from agno.models.groq import Groq | ||
from agno.tools.yfinance import YFinanceTools | ||
|
||
# Create an Agent with Groq and YFinanceTools | ||
finance_agent = Agent( | ||
model=Groq(id="deepseek-r1-distill-llama-70b-specdec"), | ||
tools=[ | ||
YFinanceTools( | ||
stock_price=True, | ||
analyst_recommendations=True, | ||
stock_fundamentals=True, | ||
company_info=True, | ||
) | ||
], | ||
description="You are an investment analyst with deep expertise in market analysis", | ||
instructions=[ | ||
"Use tables to display data where possible.", | ||
"Always call the tool before you answer.", | ||
], | ||
add_datetime_to_instructions=True, | ||
show_tool_calls=True, # Uncomment to see tool calls in the response | ||
markdown=True, | ||
) | ||
|
||
# Example usage | ||
finance_agent.print_response( | ||
"Write a report on NVDA with stock price, analyst recommendations, and stock fundamentals.", | ||
stream=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from agno.agent import Agent | ||
from agno.models.groq import Groq | ||
from agno.tools.duckduckgo import DuckDuckGoTools | ||
|
||
# Initialize the agent with the Groq model and tools for DuckDuckGo | ||
agent = Agent( | ||
model=Groq(id="deepseek-r1-distill-llama-70b-specdec"), | ||
description="You are an enthusiastic news reporter with a flair for storytelling!", | ||
tools=[DuckDuckGoTools()], # Add DuckDuckGo tool to search the web | ||
show_tool_calls=True, # Shows tool calls in the response, set to False to hide | ||
markdown=True, # Format responses in markdown | ||
) | ||
|
||
# Prompt the agent to fetch a breaking news story from New York | ||
agent.print_response("Tell me about a breaking news story from New York.", stream=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters