USING SDK
response = memgpt_client.send_message(
agent_id=agent_id,
message=prompt,
role="user",
)
--->
llm_api/helpers.py:184: UserWarning: Failed to strip inner thoughts from kwargs: Unterminated string starting at: line 2 column 14 (char 15)
warnings.warn(f"Failed to strip inner thoughts from kwargs: {e}")
Letta.letta.server.server - ERROR - Error in server._step: Unterminated string starting at: line 2 column 14 (char 15)
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/letta/server/server.py", line 435, in _step
usage_stats = letta_agent.step(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 749, in step
step_response = self.inner_step(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 958, in inner_step
raise e
File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 874, in inner_step
response = self._get_ai_reply(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 501, in _get_ai_reply
raise e
File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 472, in _get_ai_reply
response = create(
^^^^^^^
File "/usr/local/lib/python3.11/site-packages/letta/llm_api/llm_api_tools.py", line 97, in wrapper
raise e
File "/usr/local/lib/python3.11/site-packages/letta/llm_api/llm_api_tools.py", line 66, in wrapper
return func(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/letta/llm_api/llm_api_tools.py", line 170, in create
response = unpack_all_inner_thoughts_from_kwargs(response=response, inner_thoughts_key=INNER_THOUGHTS_KWARG)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/letta/llm_api/helpers.py", line 147, in unpack_all_inner_thoughts_from_kwargs
new_choices.append(unpack_inner_thoughts_from_kwargs(choice, inner_thoughts_key))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/letta/llm_api/helpers.py", line 185, in unpack_inner_thoughts_from_kwargs
raise e
File "/usr/local/lib/python3.11/site-packages/letta/llm_api/helpers.py", line 165, in unpack_inner_thoughts_from_kwargs
func_args = dict(json.loads(tool_call.function.arguments))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Unterminated string starting at: line 2 column 14 (char 15)
None
USING SDK response = memgpt_client.send_message( agent_id=agent_id, message=prompt, role="user", ) ---> llm_api/helpers.py:184: UserWarning: Failed to strip inner thoughts from kwargs: Unterminated string starting at: line 2 column 14 (char 15) warnings.warn(f"Failed to strip inner thoughts from kwargs: {e}") Letta.letta.server.server - ERROR - Error in server._step: Unterminated string starting at: line 2 column 14 (char 15) Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/letta/server/server.py", line 435, in _step usage_stats = letta_agent.step( ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 749, in step step_response = self.inner_step( ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 958, in inner_step raise e File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 874, in inner_step response = self._get_ai_reply( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 501, in _get_ai_reply raise e File "/usr/local/lib/python3.11/site-packages/letta/agent.py", line 472, in _get_ai_reply response = create( ^^^^^^^ File "/usr/local/lib/python3.11/site-packages/letta/llm_api/llm_api_tools.py", line 97, in wrapper raise e File "/usr/local/lib/python3.11/site-packages/letta/llm_api/llm_api_tools.py", line 66, in wrapper return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/letta/llm_api/llm_api_tools.py", line 170, in create response = unpack_all_inner_thoughts_from_kwargs(response=response, inner_thoughts_key=INNER_THOUGHTS_KWARG) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/letta/llm_api/helpers.py", line 147, in unpack_all_inner_thoughts_from_kwargs new_choices.append(unpack_inner_thoughts_from_kwargs(choice, inner_thoughts_key)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/letta/llm_api/helpers.py", line 185, in unpack_inner_thoughts_from_kwargs raise e File "/usr/local/lib/python3.11/site-packages/letta/llm_api/helpers.py", line 165, in unpack_inner_thoughts_from_kwargs func_args = dict(json.loads(tool_call.function.arguments)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Unterminated string starting at: line 2 column 14 (char 15) None
------ Installed letta latest: 051 pip install -U letta LLM endpoint (api.memgpt.ai)