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

先决条件

export GIPHY_API_KEY=***

示例

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

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_keystrNone如果您想手动提供 GIPHY API 密钥。
limitint1搜索时返回的 GIF 数量。

Toolkit 函数

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

开发者资源