You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I´m trying to create any tool, but it doesn´t work. I try this tool from the Deeplearning example:
def task_queue_push(self: "Agent", task_description: str):
"""
Push to a task queue stored in core memory.
Args:
task_description (str): A description of the next task you must accomplish.
Returns:
Optional[str]: None is always returned as this function
does not produce a response.
"""
import json
tasks = json.loads(self.memory.get_block("tasks").value)
tasks.append(task_description)
self.memory.update_block_value("tasks", json.dumps(tasks))
return None
When agent is working it always return me error like this:
Whenever I add any other tool, it always has issues with ´self´:
def create_file(self: "Agent", relative_path: str, initial_content: str = "") -> str:
"""
Creates a new file at '/Users/Shared/Projects/<project_name>/<relative_path>'
and optionally writes initial content.
If the file already exists, it will be overwritten.
Args:
relative_path (str): The path (relative to the project directory).
initial_content (str): Optional string content to write into the newly created file.
Returns:
str: A success or error message.
"""
import os
# Retrieve the project name from memory (adapt if your memory system differs).
project_name = self.memory.get_block("project_name").value
base_dir = "/Users/Shared/Projects"
full_path = os.path.join(base_dir, project_name, relative_path)
try:
os.makedirs(os.path.dirname(full_path), exist_ok=True)
with open(full_path, "w", encoding="utf-8") as f:
f.write(initial_content)
return f"File created at '{full_path}' with initial content."
except Exception as e:
return f"Failed to create file '{full_path}': {str(e)}"
Describe the bug
I´m trying to create any tool, but it doesn´t work. I try this tool from the Deeplearning example:
When agent is working it always return me error like this:
Whenever I add any other tool, it always has issues with ´self´:
Please describe your setup
pip install letta
What's your OS (Windows/MacOS/Linux)?
MacOS
How are you running
letta
? (cmd.exe
/Powershell/Anaconda Shell/Terminal)Terminal
Letta Config
[defaults]
preset = memgpt_chat
persona = sam_pov
human = basic
[archival_storage]
type = sqlite
path = /Users/user/.letta
[recall_storage]
type = sqlite
path = /Users/user/.letta
[metadata_storage]
type = sqlite
path = /Users/user/.letta
[version]
letta_version = 0.6.7
The text was updated successfully, but these errors were encountered: