Error handling
You can setexponential_backoff to True on the Agent to automatically retry requests that fail due to third-party model provider errors.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
Language Models are machine-learning programs that are trained to understand natural language and code.
from agno.agent import Agent
from agno.models.openai import OpenAIChat
agent = Agent(
model=OpenAIChat(id="gpt-4o"),
description="Share 15 minute healthy recipes.",
markdown=True,
)
agent.print_response("Share a breakfast recipe.", stream=True)
exponential_backoff to True on the Agent to automatically retry requests that fail due to third-party model provider errors.
agent = Agent(
model=OpenAIChat(id="gpt-4o"),
exponential_backoff=True,
retries=2,
retry_delay=1,
)
Was this page helpful?