Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /agno-agi_agno /cookbook /90_models /requesty /retry.py
| """Example demonstrating how to set up retries with Requesty.""" | |
| from agno.agent import Agent | |
| from agno.models.requesty import Requesty | |
| # --------------------------------------------------------------------------- | |
| # Create Agent | |
| # --------------------------------------------------------------------------- | |
| # We will use a deliberately wrong model ID, to trigger retries. | |
| wrong_model_id = "requesty-wrong-id" | |
| agent = Agent( | |
| model=Requesty( | |
| 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:
- 970 Bytes
- Xet hash:
- 9aa4794a9a91e1326d0b3d2a804349fa068e4ce0797d0a9a873ca96f5b354293
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.