Αλκιβιάδης Σαββόπουλος
12/17/2024, 10:52 PMcontrolflow
code that works locally and has been working online for a while, has suddenly stopped working.
The culprit:
ValueError: Task #b454bc74 ("Provide a detailed analysis of how similar compani...") failed: Encountered HTTP 429 errors while trying to fetch data using the Tavily search tool, indicating rate limits have been exceeded. Unable to complete the task due to technical limitations.
11:15:42 PM
Error
Finished in state Failed('Task run encountered an exception ValueError: Task #b454bc74 ("Provide a detailed analysis of how similar compani...") failed: Encountered HTTP 429 errors while trying to fetch data using the Tavily search tool, indicating rate limits have been exceeded. Unable to complete the task due to technical limitations.')
The simplest code snippet:
import controlflow as cf
from langchain_community.tools import TavilySearchResults
...
tavily_agent = cf.Agent(
name="Industry Researcher",
description="An AI agent that researches the latest trends and performance of any given industry.",
#model="anthropic/claude-3-5-sonnet-20240620",
model="openai/gpt-4o",
tools=[TavilySearchResults(tavily_api_key=Secret.load("tavily-api-key", _sync=True).get())],
)
### Task 5
industry_trends = cf.Task(
objective="""
Provide a detailed analysis of how similar companies are faring in the given industry.
""",
agents=[tavily_agent],
context={"industry": industry},
result_type=IndustryTrends
)
trends = industry_trends.run()
I have contacted Tavily support and they have validated that I am not crossing any limits. This looks like a Prefect/Controlflow bug. Any thoughts ?Αλκιβιάδης Σαββόπουλος
12/17/2024, 11:16 PMΑλκιβιάδης Σαββόπουλος
12/17/2024, 11:16 PM