Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

name 'function_args' is not defined #2422

Closed
2 tasks done
lemorage opened this issue Feb 8, 2025 · 1 comment · Fixed by #2423
Closed
2 tasks done

name 'function_args' is not defined #2422

lemorage opened this issue Feb 8, 2025 · 1 comment · Fixed by #2423

Comments

@lemorage
Copy link
Contributor

lemorage commented Feb 8, 2025

Describe the bug
When chatting with the Letta-created agents, I got the following error:

error = name 'function_args' is not defined
Letta.letta.agent - ERROR - step() failed with an unrecognized exception: 'name 'function_args' is not defined'
Letta.letta.server.server - ERROR - Error in server._step: name 'function_args' is not defined
Traceback (most recent call last):
  File "/Users/clannad/Library/Caches/pypoetry/virtualenvs/yanara-BBYGsHMK-py3.12/lib/python3.12/site-packages/letta/server/server.py", line 458, in _step
    usage_stats = letta_agent.step(
                  ^^^^^^^^^^^^^^^^^
  File "/Users/clannad/Library/Caches/pypoetry/virtualenvs/yanara-BBYGsHMK-py3.12/lib/python3.12/site-packages/letta/agent.py", line 616, in step
    step_response = self.inner_step(
                    ^^^^^^^^^^^^^^^^
  File "/Users/clannad/Library/Caches/pypoetry/virtualenvs/yanara-BBYGsHMK-py3.12/lib/python3.12/site-packages/letta/agent.py", line 869, in inner_step
    raise e
  File "/Users/clannad/Library/Caches/pypoetry/virtualenvs/yanara-BBYGsHMK-py3.12/lib/python3.12/site-packages/letta/agent.py", line 748, in inner_step
    all_response_messages, heartbeat_request, function_failed = self._handle_ai_response(
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/clannad/Library/Caches/pypoetry/virtualenvs/yanara-BBYGsHMK-py3.12/lib/python3.12/site-packages/letta/agent.py", line 545, in _handle_ai_response
    messages = self._handle_function_error_response(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/clannad/Library/Caches/pypoetry/virtualenvs/yanara-BBYGsHMK-py3.12/lib/python3.12/site-packages/letta/agent.py", line 290, in _handle_function_error_response
    self.interface.function_message(f"Ran {function_name}({function_args})", msg_obj=new_message)
                                                           ^^^^^^^^^^^^^
NameError: name 'function_args' is not defined. Did you mean: 'function_name'?

Please describe your setup

  • How did you install letta?
    • pip install letta
  • Describe your setup
    • What's your OS? MacOS
    • How are you running letta? Terminal

Letta Config

[defaults]
preset = memgpt_chat
persona = sam_pov
human = basic

[archival_storage]
type = chroma
path = /Users/clannad/.letta/chroma

[recall_storage]
type = sqlite
path = /Users/clannad/.letta

[metadata_storage]
type = sqlite
path = /Users/clannad/.letta

[version]
letta_version = 0.6.23
@azinasg
Copy link

azinasg commented Feb 10, 2025

Thanks for sharing your error and the fix! I tried your fix with a minor tweak and it solved the error! 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants