> ## 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.

# Giphy

**GiphyTools** 使 Agent 能够搜索 GIPHY 上的 GIF。

## 先决条件

```shell theme={null}
export GIPHY_API_KEY=***
```

## 示例

下面的 Agent 将在 GIPHY 上搜索适合生日祝福的 GIF。

```python theme={null}
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.giphy import GiphyTools


gif_agent = Agent(
    name="Gif Generator Agent",
    model=OpenAIChat(id="gpt-4o"),
    tools=[GiphyTools()],
    description="You are an AI agent that can generate gifs using Giphy.",
)

gif_agent.print_response("I want a gif to send to a friend for their birthday.")
```

## Toolkit 参数

| 参数        | 类型    | 默认值    | 描述                     |
| --------- | ----- | ------ | ---------------------- |
| `api_key` | `str` | `None` | 如果您想手动提供 GIPHY API 密钥。 |
| `limit`   | `int` | `1`    | 搜索时返回的 GIF 数量。         |

## Toolkit 函数

| 函数            | 描述                      |
| ------------- | ----------------------- |
| `search_gifs` | 根据查询字符串在 GIPHY 上搜索 GIF。 |

## 开发者资源

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