Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /agno-agi_agno /cookbook /90_models /vllm /basic.py
| """ | |
| Vllm Basic | |
| ========== | |
| Cookbook example for `vllm/basic.py`. | |
| """ | |
| import asyncio | |
| from agno.agent import Agent | |
| from agno.models.vllm import VLLM | |
| # --------------------------------------------------------------------------- | |
| # Create Agent | |
| # --------------------------------------------------------------------------- | |
| agent = Agent( | |
| model=VLLM(id="Qwen/Qwen2.5-7B-Instruct", top_k=20, enable_thinking=False), | |
| markdown=True, | |
| ) | |
| # --------------------------------------------------------------------------- | |
| # Run Agent | |
| # --------------------------------------------------------------------------- | |
| if __name__ == "__main__": | |
| # --- Sync --- | |
| agent.print_response("Share a 2 sentence horror story") | |
| # --- Sync + Streaming --- | |
| agent.print_response("Share a 2 sentence horror story", stream=True) | |
| # --- Async --- | |
| asyncio.run(agent.aprint_response("Share a 2 sentence horror story")) | |
| # --- Async + Streaming --- | |
| asyncio.run(agent.aprint_response("Share a 2 sentence horror story", stream=True)) | |
Xet Storage Details
- Size:
- 1.03 kB
- Xet hash:
- 7e91aeba390ae3e6bf7c28358e8b9b2f53c5e280154dd008fcbe432b04812315
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.