Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /agno-agi_agno /cookbook /91_tools /giphy_tools.py
| """ | |
| Giphy Tools | |
| ============================= | |
| Demonstrates giphy tools. | |
| """ | |
| from agno.agent import Agent | |
| from agno.models.openai import OpenAIChat | |
| from agno.tools.giphy import GiphyTools | |
| # --------------------------------------------------------------------------- | |
| # Create Agent | |
| # --------------------------------------------------------------------------- | |
| """Create an agent specialized in creating gifs using Giphy """ | |
| # Example 1: Enable specific Giphy functions | |
| gif_agent = Agent( | |
| name="Gif Generator Agent", | |
| model=OpenAIChat(id="gpt-5.6-luna"), | |
| tools=[GiphyTools(limit=5, enable_search_gifs=True)], | |
| description="You are an AI agent that can generate gifs using Giphy.", | |
| instructions=[ | |
| "When the user asks you to create a gif, come up with the appropriate Giphy query and use the `search_gifs` tool to find the appropriate gif.", | |
| ], | |
| ) | |
| # Example 2: Enable all Giphy functions | |
| gif_agent_all = Agent( | |
| name="Full Giphy Agent", | |
| model=OpenAIChat(id="gpt-5.6-luna"), | |
| tools=[GiphyTools(limit=10, all=True)], | |
| description="You are an AI agent with full Giphy capabilities.", | |
| instructions=[ | |
| "Use Giphy to find the perfect GIF for any situation or mood.", | |
| "Consider the user's context and preferences when searching.", | |
| ], | |
| ) | |
| # --------------------------------------------------------------------------- | |
| # Run Agent | |
| # --------------------------------------------------------------------------- | |
| if __name__ == "__main__": | |
| gif_agent.print_response("I want a gif to send to a friend for their birthday.") | |
Xet Storage Details
- Size:
- 1.58 kB
- Xet hash:
- c667475089949446bed1c4c68de95a6e9a64732c9fb7482dee261294fe3eb639
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.