Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /agno-agi_agno /cookbook /90_models /trustedrouter /basic.py
| """ | |
| TrustedRouter Basic | |
| =================== | |
| Cookbook example for `trustedrouter/basic.py`. | |
| """ | |
| import asyncio | |
| from agno.agent import Agent | |
| from agno.models.trustedrouter import TrustedRouter | |
| # --------------------------------------------------------------------------- | |
| # Create Agent | |
| # --------------------------------------------------------------------------- | |
| agent = Agent( | |
| model=TrustedRouter(), | |
| markdown=True, | |
| ) | |
| # Print the response in the terminal | |
| # --------------------------------------------------------------------------- | |
| # Run Agent | |
| # --------------------------------------------------------------------------- | |
| if __name__ == "__main__": | |
| # --- Sync --- | |
| agent.print_response("write a two sentence horror story", stream=True) | |
| # --- Sync + Streaming --- | |
| agent.print_response("write a two sentence horror story", stream=True) | |
| # --- Async --- | |
| asyncio.run(agent.aprint_response("write a two sentence horror story", stream=True)) | |
| # --- Async + Streaming --- | |
| asyncio.run(agent.aprint_response("write a two sentence horror story", stream=True)) | |
Xet Storage Details
- Size:
- 1.1 kB
- Xet hash:
- cea99c9964416f24ca126366fad473a803b94a0fd74329e658b8e80e41283575
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.