Buckets:

download
raw
1.01 kB
"""Example demonstrating how to set up retries with Meta Llama (using OpenAI-compatible endpoint)."""
from agno.agent import Agent
from agno.models.meta import LlamaOpenAI
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
# We will use a deliberately wrong model ID, to trigger retries.
wrong_model_id = "llama-wrong-id"
agent = Agent(
model=LlamaOpenAI(
id=wrong_model_id,
retries=3, # Number of times to retry the request.
delay_between_retries=1, # Delay between retries in seconds.
exponential_backoff=True, # If True, the delay between retries is doubled each time.
),
)
agent.print_response("What is the capital of France?")
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
pass

Xet Storage Details

Size:
1.01 kB
·
Xet hash:
007388c2f23604c44864e97296ef3ba350c85d11d78eae6206f4ae083aa9c703

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.