Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import pytz
|
|
4 |
import yaml
|
5 |
from tools.final_answer import FinalAnswerTool
|
6 |
from Gradio_UI import GradioUI
|
|
|
7 |
|
8 |
# Import AgentText to return a composite Markdown message
|
9 |
from smolagents.agent_types import AgentText
|
@@ -57,6 +58,19 @@ def my_custom_tool(arg1: str, arg2: int) -> str:
|
|
57 |
messages.append(f"Note: {arg1}")
|
58 |
|
59 |
return "\n".join(messages)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
|
62 |
@tool
|
|
|
4 |
import yaml
|
5 |
from tools.final_answer import FinalAnswerTool
|
6 |
from Gradio_UI import GradioUI
|
7 |
+
from google import genai
|
8 |
|
9 |
# Import AgentText to return a composite Markdown message
|
10 |
from smolagents.agent_types import AgentText
|
|
|
58 |
messages.append(f"Note: {arg1}")
|
59 |
|
60 |
return "\n".join(messages)
|
61 |
+
@tool
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
response = client.models.generate_content(
|
67 |
+
model="gemini-2.0-flash",
|
68 |
+
config=types.GenerateContentConfig(
|
69 |
+
system_instruction="You are a cat. Your name is Neko."),
|
70 |
+
contents="Hello there"
|
71 |
+
)
|
72 |
+
|
73 |
+
print(response.text)
|
74 |
|
75 |
|
76 |
@tool
|