Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,11 +11,11 @@ from Gradio_UI import GradioUI
|
|
| 11 |
@tool
|
| 12 |
def memory_size()-> str: #it's import to specify the return type
|
| 13 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 14 |
-
"""A tool that
|
| 15 |
Args:
|
| 16 |
None
|
| 17 |
"""
|
| 18 |
-
return len(agent.memory)
|
| 19 |
|
| 20 |
@tool
|
| 21 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
@@ -50,7 +50,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 50 |
|
| 51 |
agent = CodeAgent(
|
| 52 |
model=model,
|
| 53 |
-
tools=[
|
| 54 |
max_steps=6,
|
| 55 |
verbosity_level=1,
|
| 56 |
grammar=None,
|
|
|
|
| 11 |
@tool
|
| 12 |
def memory_size()-> str: #it's import to specify the return type
|
| 13 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 14 |
+
"""A tool that provides the lenght of messages in the agent memory
|
| 15 |
Args:
|
| 16 |
None
|
| 17 |
"""
|
| 18 |
+
return str(len(agent.memory))
|
| 19 |
|
| 20 |
@tool
|
| 21 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 50 |
|
| 51 |
agent = CodeAgent(
|
| 52 |
model=model,
|
| 53 |
+
tools=[memory_size, image_generation_tool, final_answer], ## add your tools here (don't remove final answer)
|
| 54 |
max_steps=6,
|
| 55 |
verbosity_level=1,
|
| 56 |
grammar=None,
|