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