代码
cookbook/tools/giphy_tools.py
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.giphy import GiphyTools
gif_agent = Agent(
name="Gif 生成器代理",
model=OpenAIChat(id="gpt-4o"),
tools=[GiphyTools(limit=5)],
description="你是一个可以使用 Giphy 生成动图的 AI 代理。",
instructions=[
"当用户要求你创建一个动图时,请想出合适的 Giphy 查询,并使用 `search_gifs` 工具来查找合适的动图。",
],
debug_mode=True,
show_tool_calls=True,
)
gif_agent.print_response("我想做一个生日动图发给朋友。")