Skip to content

Commit b86d2fc

Browse files
Update model name in tool_use.mdx for Groq (#189)
Updated model from `llama-3.3-70b-versatile` to `llama-3.1-8b-instant` as with `llama-3.3-70b-versatile` model the specific tool calling example is not working consistently . please refer to the issue agno-agi/agno#2601 ### **Description** The exact example given for Groq Agent with tools is not wroking properly . Getting some unexpected errors. ### **Steps to Reproduce** Copy the example given on the following page https://docs.agno.com/examples/models/groq/tool_use ```py from agno.agent import Agent from agno.models.groq import Groq from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.newspaper4k import Newspaper4kTools agent = Agent( model=Groq(id="llama-3.3-70b-versatile"), tools=[DuckDuckGoTools(), Newspaper4kTools()], description="You are a senior NYT researcher writing an article on a topic.", instructions=[ "For a given topic, search for the top 5 links.", "Then read each URL and extract the article text, if a URL isn't available, ignore it.", "Analyse and prepare an NYT worthy article based on the information.", ], markdown=True, show_tool_calls=True, add_datetime_to_instructions=True, ) agent.print_response("Simulation theory", stream=True) ``` ### **Expected Behavior** Output should be an article on particluar topic. ### **Actual Behavior** ```py groq.APIError: Failed to call a function. Please adjust your prompt. See 'failed_generation' for more details. ``` ### **Screenshots or Logs ** ![image](https://github.com/user-attachments/assets/0c0fa2e0-41ea-4630-bbb1-95dfb9300b79) ### **Environment** ```bash OS: Linux 6.8.0-56-generic Python Version: 3.12.3 groq==0.20.0 duckduckgo-search==7.5.5 newspaper4k==0.9.3.1 lxml-html-clean==0.4.1 agno==1.2.6 ``` ### **Solution** With changed model the example works perfectly . Seems `llama-3.3-70b-versatile` is unable to handle the tool calling for the particlular example . Refer https://docs.agno.com/models/groq Worked perfectly with ```py from agno.agent import Agent from agno.models.groq import Groq from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.newspaper4k import Newspaper4kTools agent = Agent( model=Groq(id="llama-3.1-8b-instant"), tools=[DuckDuckGoTools(), Newspaper4kTools()], description="You are a senior NYT researcher writing an article on a topic.", instructions=[ "For a given topic, search for the top 5 links.", "Then read each URL and extract the article text, if a URL isn't available, ignore it.", "Analyse and prepare an NYT worthy article based on the information.", ], markdown=True, show_tool_calls=True, add_datetime_to_instructions=True, ) agent.print_response("Simulation theory", stream=True) ``` ### **Proof** ![Screenshot from 2025-04-01 22-30-11](https://github.com/user-attachments/assets/581a26d1-5a0d-448d-9634-af99ff7d7f2d) Co-authored-by: Yash Pratap Solanky <[email protected]>
1 parent 6a7b6c4 commit b86d2fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/models/groq/tool_use.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ from agno.tools.duckduckgo import DuckDuckGoTools
1111
from agno.tools.newspaper4k import Newspaper4kTools
1212

1313
agent = Agent(
14-
model=Groq(id="llama-3.3-70b-versatile"),
14+
model=Groq(id="llama-3.1-8b-instant"),
1515
tools=[DuckDuckGoTools(), Newspaper4kTools()],
1616
description="You are a senior NYT researcher writing an article on a topic.",
1717
instructions=[
@@ -54,4 +54,4 @@ agent.print_response("Simulation theory", stream=True)
5454
```
5555
</CodeGroup>
5656
</Step>
57-
</Steps>
57+
</Steps>

0 commit comments

Comments
 (0)