|
11 | 11 | from agno.tools import tool
|
12 | 12 |
|
13 | 13 |
|
14 |
| -@tool() |
15 |
| -def generate_haiku(english: List[str], japanese: List[str]) -> str: # pylint: disable=unused-argument |
| 14 | +@tool(external_execution=True) |
| 15 | +def generate_haiku(english: List[str], japanese: List[str], image_names: List[str]) -> str: # pylint: disable=unused-argument |
16 | 16 | """
|
| 17 | +
|
17 | 18 | Generate a haiku in Japanese and its English translation.
|
18 |
| - YOU MUST PROVIDE THE ENGLISH HAIKU AND THE JAPANESE HAIKU. |
| 19 | + YOU MUST PROVIDE THE ENGLISH HAIKU AND THE JAPANESE HAIKU AND THE IMAGE NAMES. |
| 20 | + When picking image names, pick them from the following list: |
| 21 | + - "Osaka_Castle_Turret_Stone_Wall_Pine_Trees_Daytime.jpg", |
| 22 | + - "Tokyo_Skyline_Night_Tokyo_Tower_Mount_Fuji_View.jpg", |
| 23 | + - "Itsukushima_Shrine_Miyajima_Floating_Torii_Gate_Sunset_Long_Exposure.jpg", |
| 24 | + - "Takachiho_Gorge_Waterfall_River_Lush_Greenery_Japan.jpg", |
| 25 | + - "Bonsai_Tree_Potted_Japanese_Art_Green_Foliage.jpeg", |
| 26 | + - "Shirakawa-go_Gassho-zukuri_Thatched_Roof_Village_Aerial_View.jpg", |
| 27 | + - "Ginkaku-ji_Silver_Pavilion_Kyoto_Japanese_Garden_Pond_Reflection.jpg", |
| 28 | + - "Senso-ji_Temple_Asakusa_Cherry_Blossoms_Kimono_Umbrella.jpg", |
| 29 | + - "Cherry_Blossoms_Sakura_Night_View_City_Lights_Japan.jpg", |
| 30 | + - "Mount_Fuji_Lake_Reflection_Cherry_Blossoms_Sakura_Spring.jpg" |
19 | 31 |
|
20 | 32 | Args:
|
21 | 33 | english: List[str]: An array of three lines of the haiku in English. YOU MUST PROVIDE THE ENGLISH HAIKU.
|
22 | 34 | japanese: List[str]: An array of three lines of the haiku in Japanese. YOU MUST PROVIDE THE JAPANESE HAIKU.
|
| 35 | + image_names: List[str]: An array of three image names. YOU MUST PROVIDE THE IMAGE NAMES. |
| 36 | +
|
23 | 37 |
|
24 | 38 | Returns:
|
25 | 39 | str: A confirmation message.
|
26 | 40 | """ # pylint: disable=line-too-long
|
27 | 41 | return "Haiku generated"
|
28 | 42 |
|
29 |
| - |
30 |
| -@tool(external_execution=True) |
31 |
| -def change_background(background: str) -> str: # pylint: disable=unused-argument |
32 |
| - """ |
33 |
| - Change the background color of the chat. Can be anything that the CSS background attribute accepts. Regular colors, linear of radial gradients etc. |
34 |
| -
|
35 |
| - Args: |
36 |
| - background: str: The background color to change to. Can be anything that the CSS background attribute accepts. Regular colors, linear of radial gradients etc. |
37 |
| - """ # pylint: disable=line-too-long |
38 |
| - |
39 | 43 | agent = Agent(
|
40 | 44 | model=OpenAIChat(id="gpt-4o"),
|
41 |
| - tools=[generate_haiku, change_background], |
42 |
| - description="You are a helpful assistant that can help with tasks and answer questions.", |
| 45 | + tools=[generate_haiku], |
| 46 | + description="Help the user with writing Haikus. If the user asks for a haiku, use the generate_haiku tool to display the haiku to the user.", |
| 47 | + debug_mode=True, |
43 | 48 | )
|
44 | 49 |
|
45 | 50 | agui_app = AGUIApp(
|
|
0 commit comments