Pubmed

PubmedTools enable an Agent to search for Pubmed for articles.

Example

The following agent will search Pubmed for articles related to "ulcerative colitis".

1from kern.agent import Agent
2from kern.tools.pubmed import PubmedTools
3
4agent = Agent(tools=[PubmedTools()])
5agent.print_response("Tell me about ulcerative colitis.")

Toolkit Params

ParameterTypeDefaultDescription
emailstr"your_email@example.com"Specifies the email address to use.
max_resultsintNoneOptional parameter to specify the maximum number of results to return.
enable_search_pubmedboolTrueEnable the search_pubmed functionality.
allboolFalseEnable all functionality.

Toolkit Functions

FunctionDescription
search_pubmedSearches PubMed for articles based on a specified query. Parameters include query for the search term and max_results for the maximum number of results to return (default is 10). Returns a JSON string containing the search results, including publication date, title, and summary.

Developer Resources