Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /agno-agi_agno /cookbook /91_tools /valyu_tools.py
| """ | |
| This cookbook demonstrates how to use the Valyu Toolkit for academic and web search. | |
| Prerequisites: | |
| - Install: uv pip install valyu | |
| - Get API key: https://platform.valyu.network | |
| - Set environment variable: export VALYU_API_KEY with your api key or pass the api key while initializing the toolkit | |
| """ | |
| from agno.agent import Agent | |
| from agno.tools.valyu import ValyuTools | |
| # --------------------------------------------------------------------------- | |
| # Create Agent | |
| # --------------------------------------------------------------------------- | |
| agent = Agent( | |
| tools=[ValyuTools()], | |
| markdown=True, | |
| ) | |
| # Example 1: Basic Academic Paper Search | |
| # --------------------------------------------------------------------------- | |
| # Run Agent | |
| # --------------------------------------------------------------------------- | |
| if __name__ == "__main__": | |
| agent.print_response( | |
| "What are the latest safety mechanisms and mitigation strategies for CRISPR off-target effects?", | |
| markdown=True, | |
| ) | |
| # Example 2: Focused ArXiv Search with Date Filtering | |
| agent.print_response( | |
| "Search for transformer architecture papers published between June 2023 and January 2024, focusing on attention mechanisms", | |
| markdown=True, | |
| ) | |
| # Example 3: Search Within Specific Paper | |
| agent.print_response( | |
| "Search within the paper https://arxiv.org/abs/1706.03762 for details about the multi-head attention mechanism architecture", | |
| markdown=True, | |
| ) | |
| # Example 4: Search Web | |
| agent.print_response( | |
| "What are the main developments in large language model reasoning capabilities published in 2024?", | |
| markdown=True, | |
| ) | |
Xet Storage Details
- Size:
- 1.69 kB
- Xet hash:
- 8e41df5e5ea0f20fd6eb5bf61054959c872e30e5d22ca4a14439d7f090b1c016
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.