Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /agno-agi_agno /cookbook /91_tools /pubmed_tools.py
| """ | |
| Pubmed Tools | |
| ============================= | |
| Demonstrates pubmed tools. | |
| """ | |
| from agno.agent import Agent | |
| from agno.tools.pubmed import PubmedTools | |
| # --------------------------------------------------------------------------- | |
| # Create Agent | |
| # --------------------------------------------------------------------------- | |
| # Example 1: Enable all PubMed functions | |
| agent_all = Agent( | |
| tools=[ | |
| PubmedTools( | |
| all=True, # Enable all PubMed search functions | |
| ) | |
| ], | |
| markdown=True, | |
| ) | |
| # Example 2: Enable specific PubMed functions only | |
| agent_specific = Agent( | |
| tools=[ | |
| PubmedTools( | |
| enable_search_pubmed=True, # Only enable the main search function | |
| ) | |
| ], | |
| markdown=True, | |
| ) | |
| # Example 3: Default behavior with search enabled | |
| agent = Agent( | |
| tools=[ | |
| PubmedTools( | |
| enable_search_pubmed=True, | |
| ) | |
| ], | |
| markdown=True, | |
| ) | |
| # Example usage with all functions enabled | |
| # --------------------------------------------------------------------------- | |
| # Run Agent | |
| # --------------------------------------------------------------------------- | |
| if __name__ == "__main__": | |
| print("=== Example 1: Using all PubMed functions ===") | |
| agent_all.print_response( | |
| "Tell me about ulcerative colitis and find the latest research." | |
| ) | |
| # Example usage with specific functions only | |
| print("\n=== Example 2: Using specific PubMed functions (search only) ===") | |
| agent_specific.print_response("Search for recent studies on diabetes treatment.") | |
| # Example usage with default configuration | |
| print("\n=== Example 3: Default PubMed agent usage ===") | |
| agent.print_response("Tell me about ulcerative colitis.") | |
| agent.print_response("Find research papers on machine learning in healthcare.") | |
Xet Storage Details
- Size:
- 1.8 kB
- Xet hash:
- da28970e01ffcba1aee0536a233d1c952c4c8428d873a502d2d6ddc478a72540
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.