cpacker / MemGPT

Create LLM agents with long-term memory and custom tools 📚🦙
https://memgpt.readme.io
Apache License 2.0
10.77k stars 1.16k forks source link

memgpt_doc - missing 'doc' and 'pos' #507

Closed zdendos closed 7 months ago

zdendos commented 7 months ago

I am testing latest version MemGPT with local llm ( llama.cpp with dolphin-2.2.1-mistral-7b.Q4_K_M.gguf), with source txt file. And offten I am getting this error:

Traceback (most recent call last): File "/Users/zdendos/developing/local/MemGPT/memgpt/main.py", line 608, in run_agent_loop new_messages, user_message, skip_next_user_input = process_agent_step(user_message, no_verify) File "/Users/zdendos/developing/local/MemGPT/memgpt/main.py", line 584, in process_agent_step new_messages, heartbeat_request, function_failed, token_warning = memgpt_agent.step( File "/Users/zdendos/developing/local/MemGPT/memgpt/agent.py", line 655, in step raise e File "/Users/zdendos/developing/local/MemGPT/memgpt/agent.py", line 586, in step response = self.get_ai_reply( File "/Users/zdendos/developing/local/MemGPT/memgpt/agent.py", line 801, in get_ai_reply raise e File "/Users/zdendos/developing/local/MemGPT/memgpt/agent.py", line 783, in get_ai_reply response = chat_completion_with_backoff( File "/Users/zdendos/developing/local/MemGPT/memgpt/openai_tools.py", line 57, in wrapper raise e File "/Users/zdendos/developing/local/MemGPT/memgpt/openai_tools.py", line 38, in wrapper return func(*args, kwargs) File "/Users/zdendos/developing/local/MemGPT/memgpt/openai_tools.py", line 116, in chat_completion_with_backoff return get_chat_completion(kwargs) File "/Users/zdendos/developing/local/MemGPT/memgpt/local_llm/chat_completion_proxy.py", line 118, in get_chat_completion raise LocalLLMError(f"Failed to parse JSON from local LLM response - error: {str(e)}") memgpt.errors.LocalLLMError: Failed to parse JSON from local LLM response - error: Failed to decode JSON from LLM output:

.... ( this part is changing ) ....

JSONDecodeError.init() missing 2 required positional arguments: 'doc' and 'pos' ? Retry agent.step()? (Y/n)

cpacker commented 7 months ago

Q4_K_M will make JSON errors pretty frequently, which is causing these errors. Is it possible for you to use Q5, Q6, or Q8? The higher the better.

zdendos commented 7 months ago

My resources are limited. I have Macbook Air M1 with only 8 GB ram. But I got model dolphin-2.2.1-mistral-7b.Q5_K_M.gguf up and running ... Q6 is out or reach ( not enought memory ). I will do some testings with it and I will let you know.

zdendos commented 7 months ago

I noted, how you extended code for GARBAGEGARBAGEGARBAGE for json in the last commit. Will be possible to do that for missing "," in json response?

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/zdendos/developing/local/MemGPT/memgpt/main.py", line 608, in run_agent_loop new_messages, user_message, skip_next_user_input = process_agent_step(user_message, no_verify) File "/Users/zdendos/developing/local/MemGPT/memgpt/main.py", line 584, in process_agent_step new_messages, heartbeat_request, function_failed, token_warning = memgpt_agent.step( File "/Users/zdendos/developing/local/MemGPT/memgpt/agent.py", line 655, in step raise e File "/Users/zdendos/developing/local/MemGPT/memgpt/agent.py", line 586, in step response = self.get_ai_reply( File "/Users/zdendos/developing/local/MemGPT/memgpt/agent.py", line 801, in get_ai_reply raise e File "/Users/zdendos/developing/local/MemGPT/memgpt/agent.py", line 783, in get_ai_reply response = chat_completion_with_backoff( File "/Users/zdendos/developing/local/MemGPT/memgpt/openai_tools.py", line 57, in wrapper raise e File "/Users/zdendos/developing/local/MemGPT/memgpt/openai_tools.py", line 38, in wrapper return func(*args, kwargs) File "/Users/zdendos/developing/local/MemGPT/memgpt/openai_tools.py", line 116, in chat_completion_with_backoff return get_chat_completion(kwargs) File "/Users/zdendos/developing/local/MemGPT/memgpt/local_llm/chat_completion_proxy.py", line 118, in get_chat_completion raise LocalLLMError(f"Failed to parse JSON from local LLM response - error: {str(e)}") memgpt.errors.LocalLLMError: Failed to parse JSON from local LLM response - error: Failed to decode JSON from LLM output: { "function": "archival_memory_search", "params": { "inner_thoughts": "User has logged in. Verification complete.", "message": "My archival memory contains all information I have ever encountered or processed. It serves as a vast repository of knowledge, experiences, and interactions." "time": "203-11-26 10:50 AM" } - error

CoderTom314 commented 7 months ago

I am using dolphin-2.2.1-mistral-7b.Q8_0.gguf with memgpt localllm, and i also got this error.

Then write the story according to the specified requirements [A[KUsing model webui, endpoint: http://localhost:5000 trying adding } trying adding }} trying adding "}} trying repair_json_string: { "function": "send_message", "params": { "inner_thoughts": "Title: The Origins of the Space Race\n\nIntroduction: The origins of the space race date back to the early 1960s, during the height of the Cold War. Amidst the tense rivalry between the US and the USSR, both nations were determined to make groundbreaking scientific breakthroughs and further demonstrate their dominance in technology and innovation.\n\nParagraph 2: The race to be the first to explore the cosmos began when the Soviet Union launched Sputnik 1, the world's first artificial satellite, in

  1. This achievement shocked the United States and served as a catalyst for the nascent space program.\n\nParagraph 3: In response, the American government founded NASA in 1958. The United States embarked on an ambitious mission to outpace the Soviets in space exploration, with an emphasis on manned missions. This rivalry was the foundation for one of the greatest scientific achievements in history: the space race.\n\nEnding: On April 12, 1961, Soviet cosmonaut Yuri Gagarin became the first human to journey into outer space. His historic voyage around the Earth in Vostok 1 spanned just 108 minutes, but it forever etched his name in the history books. The space race inspired many more pioneering missions and advancements in technology, science, and human achievement. It is a testament to the power of human ambition and the pursuit of knowledge, even in the midst of the most tumultuous times.\n\nTakeaway: The origins of the space race were deeply rooted in the tensions of the Cold War era, as both the US and the USSR aimed to solidify their position as the world's leading superpower through groundbreaking achievements in space exploration.", trying repair_even_worse_json: { "function": "send_message", "params": { "inner_thoughts": "Title: The Origins of the Space Race\n\nIntroduction: The origins of the space race date back to the early 1960s, during the height of the Cold War. Amidst the tense rivalry between the US and the USSR, both nations were determined to make groundbreaking scientific breakthroughs and further demonstrate their dominance in technology and innovation.\n\nParagraph 2: The race to be the first to explore the cosmos began when the Soviet Union launched Sputnik 1, the world's first artificial satellite, in
  2. This achievement shocked the United States and served as a catalyst for the nascent space program.\n\nParagraph 3: In response, the American government founded NASA in 1958. The United States embarked on an ambitious mission to outpace the Soviets in space exploration, with an emphasis on manned missions. This rivalry was the foundation for one of the greatest scientific achievements in history: the space race.\n\nEnding: On April 12, 1961, Soviet cosmonaut Yuri Gagarin became the first human to journey into outer space. His historic voyage around the Earth in Vostok 1 spanned just 108 minutes, but it forever etched his name in the history books. The space race inspired many more pioneering missions and advancements in technology, science, and human achievement. It is a testament to the power of human ambition and the pursuit of knowledge, even in the midst of the most tumultuous times.\n\nTakeaway: The origins of the space race were deeply rooted in the tensions of the Cold War era, as both the US and the USSR aimed to solidify their position as the world's leading superpower through groundbreaking achievements in space exploration.", trying first_json step() failed user_message = {"type": "user_message", "message": "Then write the story according to the specified requirements", "time": "2023-11-28 10:57:09 AM "} error = Failed to parse JSON from local LLM response - error: Failed to decode JSON from LLM output: { "function": "send_message", "params": { "inner_thoughts": "Title: The Origins of the Space Race\n\nIntroduction: The origins of the space race date back to the early 1960s, during the height of the Cold War. Amidst the tense rivalry between the US and the USSR, both nations were determined to make groundbreaking scientific breakthroughs and further demonstrate their dominance in technology and innovation.\n\nParagraph 2: The race to be the first to explore the cosmos began when the Soviet Union launched Sputnik 1, the world's first artificial satellite, in
  3. This achievement shocked the United States and served as a catalyst for the nascent space program.\n\nParagraph 3: In response, the American government founded NASA in 1958. The United States embarked on an ambitious mission to outpace the Soviets in space exploration, with an emphasis on manned missions. This rivalry was the foundation for one of the greatest scientific achievements in history: the space race.\n\nEnding: On April 12, 1961, Soviet cosmonaut Yuri Gagarin became the first human to journey into outer space. His historic voyage around the Earth in Vostok 1 spanned just 108 minutes, but it forever etched his name in the history books. The space race inspired many more pioneering missions and advancements in technology, science, and human achievement. It is a testament to the power of human ambition and the pursuit of knowledge, even in the midst of the most tumultuous times.\n\nTakeaway: The origins of the space race were deeply rooted in the tensions of the Cold War era, as both the US and the USSR aimed to solidify their position as the world's leading superpower through groundbreaking achievements in space exploration.", - error JSONDecodeError.init() missing 2 required positional arguments: 'doc' and 'pos' step() failed with openai.InvalidRequestError, but didn't recognize the error message: 'Failed to parse JSON from local LLM response
    • error: Failed to decode JSON from LLM output: { "function": "send_message", "params": { "inner_thoughts": "Title: The Origins of the Space Race\n\nIntroduction: The origins of the space race date back to the early 1960s, during the height of the Cold War. Amidst the tense rivalry between the US and the USSR, both nations were determined to make groundbreaking scientific breakthroughs and further demonstrate their dominance in technology and innovation.\n\nParagraph 2: The race to be the first to explore the cosmos began when the Soviet Union launched Sputnik 1, the world's first artificial satellite, in
  4. This achievement shocked the United States and served as a catalyst for the nascent space program.\n\nParagraph 3: In response, the American government founded NASA in 1958. The United States embarked on an ambitious mission to outpace the Soviets in space exploration, with an emphasis on manned missions. This rivalry was the foundation for one of the greatest scientific achievements in history: the space race.\n\nEnding: On April 12, 1961, Soviet cosmonaut Yuri Gagarin became the first human to journey into outer space. His historic voyage around the Earth in Vostok 1 spanned just 108 minutes, but it forever etched his name in the history books. The space race inspired many more pioneering missions and advancements in technology, science, and human achievement. It is a testament to the power of human ambition and the pursuit of knowledge, even in the midst of the most tumultuous times.\n\nTakeaway: The origins of the space race were deeply rooted in the tensions of the Cold War era, as both the US and the USSR aimed to solidify their position as the world's leading superpower through groundbreaking achievements in space exploration.", - error JSONDecodeError.init() missing 2 required positional arguments: 'doc' and 'pos'' An exception ocurred when running agent.step(): Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 130, in clean_json data = json.loads(raw_llm_output) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 4 column 1687 (char 1732)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 134, in clean_json data = json.loads(raw_llm_output + "}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 4 column 1687 (char 1732)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 138, in clean_json data = json.loads(raw_llm_output + "}}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 4 column 1687 (char 1732)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 142, in clean_json data = json.loads(raw_llm_output + '"}}') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Unterminated string starting at: line 4 column 1687 (char 1732)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 147, in clean_json data = json.loads(repaired) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 4 column 1687 (char 1732)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 152, in clean_json data = json.loads(repaired) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 4 column 1687 (char 1732)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 18, in extract_first_json return json.loads(string[start_index : i + 1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\thoma\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 4 column 1687 (char 1732)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\llm_chat_completion_wrappers\airoboros.py", line 397, in output_to_chat_completion_response function_json_output = clean_json(raw_llm_output) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 156, in clean_json data = extract_first_json(raw_llm_output + "}}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\json_parser.py", line 20, in extract_first_json raise json.JSONDecodeError(f"Matched closing bracket, but decode failed with error: {str(e)}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: JSONDecodeError.init() missing 2 required positional arguments: 'doc' and 'pos'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\chat_completion_proxy.py", line 114, in get_chat_completion chat_completion_result = llm_wrapper.output_to_chat_completion_response(result) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\llm_chat_completion_wrappers\airoboros.py", line 399, in output_to_chat_completion_response raise Exception(f"Failed to decode JSON from LLM output:\n{raw_llm_output} - error\n{str(e)}") Exception: Failed to decode JSON from LLM output: { "function": "send_message", "params": { "inner_thoughts": "Title: The Origins of the Space Race\n\nIntroduction: The origins of the space race date back to the early 1960s, during the height of the Cold War. Amidst the tense rivalry between the US and the USSR, both nations were determined to make groundbreaking scientific breakthroughs and further demonstrate their dominance in technology and innovation.\n\nParagraph 2: The race to be the first to explore the cosmos began when the Soviet Union launched Sputnik 1, the world's first artificial satellite, in 1957. This achievement shocked the United States and served as a catalyst for the nascent space program.\n\nParagraph 3: In response, the American government founded NASA in 1958. The United States embarked on an ambitious mission to outpace the Soviets in space exploration, with an emphasis on manned missions. This rivalry was the foundation for one of the greatest scientific achievements in history: the space race.\n\nEnding: On April 12, 1961, Soviet cosmonaut Yuri Gagarin became the first human to journey into outer space. His historic voyage around the Earth in Vostok 1 spanned just 108 minutes, but it forever etched his name in the history books. The space race inspired many more pioneering missions and advancements in technology, science, and human achievement. It is a testament to the power of human ambition and the pursuit of knowledge, even in the midst of the most tumultuous times.\n\nTakeaway: The origins of the space race were deeply rooted in the tensions of the Cold War era, as both the US and the USSR aimed to solidify their position as the world's leading superpower through groundbreaking achievements in space exploration.", - error JSONDecodeError.init() missing 2 required positional arguments: 'doc' and 'pos'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\main.py", line 608, in run_agent_loop new_messages, user_message, skip_next_user_input = process_agent_step(user_message, no_verify) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\main.py", line 584, in process_agent_step new_messages, heartbeat_request, function_failed, token_warning = memgpt_agent.step( ^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\agent.py", line 655, in step raise e File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\agent.py", line 586, in step response = self.get_ai_reply( ^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\agent.py", line 801, in get_ai_reply raise e File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\agent.py", line 783, in get_ai_reply response = chat_completion_with_backoff( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\openai_tools.py", line 57, in wrapper raise e File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\openai_tools.py", line 38, in wrapper return func(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\openai_tools.py", line 116, in chat_completion_with_backoff return get_chat_completion(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\memgpt\memgpt_venv\Lib\site-packages\memgpt\local_llm\chat_completion_proxy.py", line 118, in get_chat_completion raise LocalLLMError(f"Failed to parse JSON from local LLM response - error: {str(e)}") memgpt.errors.LocalLLMError: Failed to parse JSON from local LLM response - error: Failed to decode JSON from LLM output: { "function": "send_message", "params": { "inner_thoughts": "Title: The Origins of the Space Race\n\nIntroduction: The origins of the space race date back to the early 1960s, during the height of the Cold War. Amidst the tense rivalry between the US and the USSR, both nations were determined to make groundbreaking scientific breakthroughs and further demonstrate their dominance in technology and innovation.\n\nParagraph 2: The race to be the first to explore the cosmos began when the Soviet Union launched Sputnik 1, the world's first artificial satellite, in 1957. This achievement shocked the United States and served as a catalyst for the nascent space program.\n\nParagraph 3: In response, the American government founded NASA in 1958. The United States embarked on an ambitious mission to outpace the Soviets in space exploration, with an emphasis on manned missions. This rivalry was the foundation for one of the greatest scientific achievements in history: the space race.\n\nEnding: On April 12, 1961, Soviet cosmonaut Yuri Gagarin became the first human to journey into outer space. His historic voyage around the Earth in Vostok 1 spanned just 108 minutes, but it forever etched his name in the history books. The space race inspired many more pioneering missions and advancements in technology, science, and human achievement. It is a testament to the power of human ambition and the pursuit of knowledge, even in the midst of the most tumultuous times.\n\nTakeaway: The origins of the space race were deeply rooted in the tensions of the Cold War era, as both the US and the USSR aimed to solidify their position as the world's leading superpower through groundbreaking achievements in space exploration.", - error JSONDecodeError.init() missing 2 required positional arguments: 'doc' and 'pos' ? Retry agent.step()? (Y/n)

cpacker commented 7 months ago

These are JSON decoding errors: https://memgpt.readthedocs.io/en/latest/local_llm_faq/#failed-to-parse-json-from-local-llm-response

In the last example, what happened is the LLM never closed the JSON brackets - maybe because it hit a max token limit on the way? (there's quite a bit of text)

These sorts of errors are quite tricky to debug as mentioned in the linked FAQ - if you message in the #support channel on Discord I can try to work through the errors with you on your own personal setup.

If you can only run small models (Q4 and smaller), consider trying a model wrapper that uses grammars: https://memgpt.readthedocs.io/en/latest/local_llm/#grammars