> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Pubmed

**PubmedTools** 使 Agent 能够搜索 Pubmed 以查找文章。

## 示例

以下 Agent 将在 Pubmed 中搜索与“溃疡性结肠炎”相关的文章。

```python cookbook/tools/pubmed.py theme={null}
from agno.agent import Agent
from agno.tools.pubmed import PubmedTools

agent = Agent(tools=[PubmedTools()], show_tool_calls=True)
agent.print_response("Tell me about ulcerative colitis.")
```

## Toolkit 参数

| 参数            | 类型    | 默认值                        | 描述                  |
| ------------- | ----- | -------------------------- | ------------------- |
| `email`       | `str` | `"your_email@example.com"` | 指定要使用的电子邮件地址。       |
| `max_results` | `int` | `None`                     | 可选参数，用于指定返回的最大结果数量。 |

## Toolkit 函数

| 函数              | 描述                                                                                                              |
| --------------- | --------------------------------------------------------------------------------------------------------------- |
| `search_pubmed` | 根据指定的查询在 PubMed 中搜索文章。参数包括用于搜索词的 `query` 和用于返回最大结果数的 `max_results`（默认为 10）。返回一个包含搜索结果的 JSON 字符串，其中包括出版日期、标题和摘要。 |

## 开发人员资源

* 查看 [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/pubmed.py)
* 查看 [Cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/tools/pubmed_tools.py)
