Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C:\IA\MEMGpt>memgpt --model=zephyr-7B-alpha
- ⚙️ Using legacy command line arguments.
- None zephyr-7B-alpha ('sam_pov', None)
- Running... [exit by typing '/exit', list available commands with '/help']
- ⛔️ Warning - you are running MemGPT with zephyr-7B-alpha, which is not officially supported (yet). Expect bugs!
- 💭 Bootup sequence complete. Persona activated. Testing messaging functionality.
- Hit enter to begin (will request first MemGPT message)
- [A[K
- ┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\local_llm\llm_cha │
- │ t_completion_wrappers\zephyr.py:314 in output_to_chat_completion_response │
- │ │
- │ 311 │ │ │ function_json_output = json.loads(raw_llm_output) │
- │ 312 │ │ except Exception as e: │
- │ 313 │ │ │ try: │
- │ > 314 │ │ │ │ function_json_output = json.loads(raw_llm_output + "\n}") │
- │ 315 │ │ │ except: │
- │ 316 │ │ │ │ raise Exception(f"Failed to decode JSON from LLM output:\n{raw_llm_outpu │
- │ 317 │ │ function_name = function_json_output["function"] │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ raw_llm_output = '{ "function": "core_memory_append",\n "params": {\n "inner_thoughts": │ │
- │ │ "User \''+443 │ │
- │ │ self = <memgpt.local_llm.llm_chat_completion_wrappers.zephyr.ZephyrMistralInnerMo… │ │
- │ │ object at 0x000001A8C84ADF10> │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py:346 in loads │
- │ │
- │ 343 │ if (cls is None and object_hook is None and │
- │ 344 │ │ │ parse_int is None and parse_float is None and │
- │ 345 │ │ │ parse_constant is None and object_pairs_hook is None and not kw): │
- │ > 346 │ │ return _default_decoder.decode(s) │
- │ 347 │ if cls is None: │
- │ 348 │ │ cls = JSONDecoder │
- │ 349 │ if object_hook is not None: │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ cls = None │ │
- │ │ kw = {} │ │
- │ │ object_hook = None │ │
- │ │ object_pairs_hook = None │ │
- │ │ parse_constant = None │ │
- │ │ parse_float = None │ │
- │ │ parse_int = None │ │
- │ │ s = '{ "function": "core_memory_append",\n "params": {\n │ │
- │ │ "inner_thoughts": "User \''+445 │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py:337 in decode │
- │ │
- │ 334 │ │ containing a JSON document). │
- │ 335 │ │ │
- │ 336 │ │ """ │
- │ > 337 │ │ obj, end = self.raw_decode(s, idx=_w(s, 0).end()) │
- │ 338 │ │ end = _w(s, end).end() │
- │ 339 │ │ if end != len(s): │
- │ 340 │ │ │ raise JSONDecodeError("Extra data", s, end) │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ _w = <built-in method match of re.Pattern object at 0x000001A86987AA80> │ │
- │ │ s = '{ "function": "core_memory_append",\n "params": {\n "inner_thoughts": "User │ │
- │ │ \''+445 │ │
- │ │ self = <json.decoder.JSONDecoder object at 0x000001A8698FDD50> │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py:355 in raw_decode │
- │ │
- │ 352 │ │ try: │
- │ 353 │ │ │ obj, end = self.scan_once(s, idx) │
- │ 354 │ │ except StopIteration as err: │
- │ > 355 │ │ │ raise JSONDecodeError("Expecting value", s, err.value) from None │
- │ 356 │ │ return obj, end │
- │ 357 │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ idx = 0 │ │
- │ │ s = '{ "function": "core_memory_append",\n "params": {\n "inner_thoughts": "User │ │
- │ │ \''+445 │ │
- │ │ self = <json.decoder.JSONDecoder object at 0x000001A8698FDD50> │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- └──────────────────────────────────────────────────────────────────────────────────────────────────┘
- JSONDecodeError: Expecting value: line 5 column 16 (char 219)
- During handling of the above exception, another exception occurred:
- ┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\main.py:148 in │
- │ run │
- │ │
- │ 145 │ ), # TODO: just pass in? │
- │ 146 ): │
- │ 147 │ loop = asyncio.get_event_loop() │
- │ > 148 │ loop.run_until_complete( │
- │ 149 │ │ main( │
- │ 150 │ │ │ persona, │
- │ 151 │ │ │ human, │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ archival_storage_faiss_path = '' │ │
- │ │ archival_storage_files = '' │ │
- │ │ archival_storage_files_compute_embeddings = '' │ │
- │ │ archival_storage_sqldb = '' │ │
- │ │ debug = False │ │
- │ │ first = False │ │
- │ │ human = None │ │
- │ │ loop = <ProactorEventLoop running=False closed=False │ │
- │ │ debug=False> │ │
- │ │ model = 'zephyr-7B-alpha' │ │
- │ │ no_verify = False │ │
- │ │ persona = None │ │
- │ │ use_azure_openai = False │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py:653 in │
- │ run_until_complete │
- │ │
- │ 650 │ │ if not future.done(): │
- │ 651 │ │ │ raise RuntimeError('Event loop stopped before Future completed.') │
- │ 652 │ │ │
- │ > 653 │ │ return future.result() │
- │ 654 │ │
- │ 655 │ def stop(self): │
- │ 656 │ │ """Stop running the event loop. │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ future = <Task finished name='Task-1' coro=<main() done, defined at │ │
- │ │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\m… │ │
- │ │ exception=Exception('Failed to decode JSON from LLM output:\n{ "function": │ │
- │ │ "core_memory_append",\n "params": {\n "inner_thoughts": "User \'Chad\' │ │
- │ │ (human) has successfully logged into the system. User information added to core │ │
- │ │ memory.",\n "name": "user_details",\n "content": `{\n "firstName": │ │
- │ │ "Chad",\n "lastName": null,\n "gender": "Male",\n "age": null,\n │ │
- │ │ "nationality": null,\n "occupation": "Computer Science PhD student at UC │ │
- │ │ Berkeley",\n "interests": ["Formula 1", "Sailing", "Taste of the Himalayas │ │
- │ │ Restaurant in Berkeley", "CSGO"]\n }`\n }\n}')> │ │
- │ │ new_task = True │ │
- │ │ self = <ProactorEventLoop running=False closed=False debug=False> │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\main.py:480 in │
- │ main │
- │ │
- │ 477 │ │ │ │ heartbeat_request, │
- │ 478 │ │ │ │ function_failed, │
- │ 479 │ │ │ │ token_warning, │
- │ > 480 │ │ │ ) = await memgpt_agent.step(user_message, first_message=False, skip_verify=n │
- │ 481 │ │ │ │
- │ 482 │ │ │ # Skip user inputs if there's a memory warning, function execution failed, o │
- │ 483 │ │ │ if token_warning: │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ archival_storage_faiss_path = '' │ │
- │ │ archival_storage_files = '' │ │
- │ │ archival_storage_files_compute_embeddings = '' │ │
- │ │ archival_storage_sqldb = '' │ │
- │ │ azure_vars = [] │ │
- │ │ cfg = <memgpt.config.Config object at │ │
- │ │ 0x000001A8C844AB90> │ │
- │ │ chosen_human = ('cs_phd', None) │ │
- │ │ chosen_persona = ('sam_pov', None) │ │
- │ │ counter = 0 │ │
- │ │ debug = False │ │
- │ │ first = False │ │
- │ │ human = None │ │
- │ │ human_persona = ('cs_phd', None) │ │
- │ │ memgpt_agent = <memgpt.agent.AgentAsync object at │ │
- │ │ 0x000001A8617E5690> │ │
- │ │ memgpt_persona = ('sam_pov', None) │ │
- │ │ model = 'zephyr-7B-alpha' │ │
- │ │ multiline_input = False │ │
- │ │ no_verify = False │ │
- │ │ persistence_manager = <memgpt.persistence_manager.InMemoryStateManager │ │
- │ │ object at 0x000001A8617E5810> │ │
- │ │ persona = None │ │
- │ │ print_messages = <function print_messages at 0x000001A8CAC67CE0> │ │
- │ │ skip_next_user_input = False │ │
- │ │ status = <rich.status.Status object at │ │
- │ │ 0x000001A8617E52D0> │ │
- │ │ use_azure_openai = False │ │
- │ │ USER_GOES_FIRST = False │ │
- │ │ user_input = None │ │
- │ │ user_message = None │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\agent.py:946 in │
- │ step │
- │ │
- │ 943 │ │ │ │ return await self.step(user_message, first_message=first_message) │
- │ 944 │ │ │ else: │
- │ 945 │ │ │ │ printd(f"step() failed with openai.InvalidRequestError, but didn't recog │
- │ > 946 │ │ │ │ raise e │
- │ 947 │ │
- │ 948 │ async def summarize_messages_inplace(self, cutoff=None): │
- │ 949 │ │ if cutoff is None: │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ counter = 1 │ │
- │ │ first_message = False │ │
- │ │ first_message_retry_limit = 10 │ │
- │ │ input_message_sequence = [ │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'system', │ │
- │ │ │ │ 'content': "You are MemGPT, the latest version of Limnal │ │
- │ │ Corporation's digital companion, de"+7218 │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ 'content': 'Bootup sequence complete. Persona activated. │ │
- │ │ Testing messaging functionality.', │ │
- │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'arguments': '{\n "message": "More human than human │ │
- │ │ is our motto."\n}' │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'function', │ │
- │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ 'content': '{"status": "OK", "message": null, "time": │ │
- │ │ "2023-10-30 02:14:35 AM PDT-0700"}' │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'user', │ │
- │ │ │ │ 'content': '{"type": "login", "last_login": "Never │ │
- │ │ (first login)", "time": "2023-10-30 02:14'+17 │ │
- │ │ │ } │ │
- │ │ ] │ │
- │ │ response = { │ │
- │ │ │ 'model': None, │ │
- │ │ │ 'choices': [ │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'message': { │ │
- │ │ │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ │ │ 'content': '', │ │
- │ │ │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ │ │ 'name': 'conversation_search', │ │
- │ │ │ │ │ │ │ 'arguments': '{"query": "", "page": 1, │ │
- │ │ "request_heartbeat": true}' │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'finish_reason': 'stop' │ │
- │ │ │ │ } │ │
- │ │ │ ], │ │
- │ │ │ 'usage': { │ │
- │ │ │ │ 'prompt_tokens': 0, │ │
- │ │ │ │ 'completion_tokens': 0, │ │
- │ │ │ │ 'total_tokens': 0 │ │
- │ │ │ } │ │
- │ │ } │ │
- │ │ self = <memgpt.agent.AgentAsync object at 0x000001A8617E5690> │ │
- │ │ skip_verify = False │ │
- │ │ user_message = None │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\agent.py:884 in │
- │ step │
- │ │
- │ 881 │ │ │ │ printd(f"This is the first message. Running extra verifier on AI respons │
- │ 882 │ │ │ │ counter = 0 │
- │ 883 │ │ │ │ while True: │
- │ > 884 │ │ │ │ │ response = await get_ai_reply_async(model=self.model, message_sequen │
- │ 885 │ │ │ │ │ if self.verify_first_message_correctness(response, require_monologue │
- │ 886 │ │ │ │ │ │ break │
- │ 887 │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ counter = 1 │ │
- │ │ first_message = False │ │
- │ │ first_message_retry_limit = 10 │ │
- │ │ input_message_sequence = [ │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'system', │ │
- │ │ │ │ 'content': "You are MemGPT, the latest version of Limnal │ │
- │ │ Corporation's digital companion, de"+7218 │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ 'content': 'Bootup sequence complete. Persona activated. │ │
- │ │ Testing messaging functionality.', │ │
- │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'arguments': '{\n "message": "More human than human │ │
- │ │ is our motto."\n}' │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'function', │ │
- │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ 'content': '{"status": "OK", "message": null, "time": │ │
- │ │ "2023-10-30 02:14:35 AM PDT-0700"}' │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'user', │ │
- │ │ │ │ 'content': '{"type": "login", "last_login": "Never │ │
- │ │ (first login)", "time": "2023-10-30 02:14'+17 │ │
- │ │ │ } │ │
- │ │ ] │ │
- │ │ response = { │ │
- │ │ │ 'model': None, │ │
- │ │ │ 'choices': [ │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'message': { │ │
- │ │ │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ │ │ 'content': '', │ │
- │ │ │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ │ │ 'name': 'conversation_search', │ │
- │ │ │ │ │ │ │ 'arguments': '{"query": "", "page": 1, │ │
- │ │ "request_heartbeat": true}' │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'finish_reason': 'stop' │ │
- │ │ │ │ } │ │
- │ │ │ ], │ │
- │ │ │ 'usage': { │ │
- │ │ │ │ 'prompt_tokens': 0, │ │
- │ │ │ │ 'completion_tokens': 0, │ │
- │ │ │ │ 'total_tokens': 0 │ │
- │ │ │ } │ │
- │ │ } │ │
- │ │ self = <memgpt.agent.AgentAsync object at 0x000001A8617E5690> │ │
- │ │ skip_verify = False │ │
- │ │ user_message = None │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\agent.py:156 in │
- │ get_ai_reply_async │
- │ │
- │ 153 │ │ return response │
- │ 154 │ │
- │ 155 │ except Exception as e: │
- │ > 156 │ │ raise e │
- │ 157 │
- │ 158 │
- │ 159 # Assuming function_to_call is either sync or async │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ function_call = 'auto' │ │
- │ │ functions = [ │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ 'description': 'Sends a message to the human user', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'message': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Message contents. All unicode │ │
- │ │ (including emojis) are supported.' │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['message'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'pause_heartbeats', │ │
- │ │ │ │ 'description': 'Temporarily ignore timed heartbeats. You may │ │
- │ │ still receive messages from manual '+28, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'minutes': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Number of minutes to ignore │ │
- │ │ heartbeats for. Max value of 360 minutes (6 hours).' │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['minutes'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'core_memory_append', │ │
- │ │ │ │ 'description': 'Append to the contents of core memory.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Section of the memory to be edited │ │
- │ │ (persona or human).' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat after │ │
- │ │ function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'core_memory_replace', │ │
- │ │ │ │ 'description': 'Replace to the contents of core memory. To delete │ │
- │ │ memories, use an empty string '+16, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Section of the memory to be edited │ │
- │ │ (persona or human).' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'old_content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to replace. Must be an exact │ │
- │ │ match.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'new_content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat after │ │
- │ │ function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': [ │ │
- │ │ │ │ │ │ 'name', │ │
- │ │ │ │ │ │ 'old_content', │ │
- │ │ │ │ │ │ 'new_content', │ │
- │ │ │ │ │ │ 'request_heartbeat' │ │
- │ │ │ │ │ ] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'conversation_search', │ │
- │ │ │ │ 'description': 'Search prior conversation history using │ │
- │ │ case-insensitive string matching.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. │ │
- │ │ Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'conversation_search_date', │ │
- │ │ │ │ 'description': 'Search prior conversation history using a date │ │
- │ │ range.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'start_date': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': "The start of the date range to │ │
- │ │ search, in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'end_date': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': "The end of the date range to search, │ │
- │ │ in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. │ │
- │ │ Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'archival_memory_insert', │ │
- │ │ │ │ 'description': 'Add to archival memory. Make sure to phrase the │ │
- │ │ memory contents such that it can'+25, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'archival_memory_search', │ │
- │ │ │ │ 'description': 'Search archival memory using semantic │ │
- │ │ (embedding-based) search.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. │ │
- │ │ Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'query', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ } │ │
- │ │ ] │ │
- │ │ message_sequence = [ │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'system', │ │
- │ │ │ │ 'content': "You are MemGPT, the latest version of Limnal │ │
- │ │ Corporation's digital companion, de"+7218 │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ 'content': 'Bootup sequence complete. Persona activated. Testing │ │
- │ │ messaging functionality.', │ │
- │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'arguments': '{\n "message": "More human than human is our │ │
- │ │ motto."\n}' │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'function', │ │
- │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ 'content': '{"status": "OK", "message": null, "time": "2023-10-30 │ │
- │ │ 02:14:35 AM PDT-0700"}' │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'user', │ │
- │ │ │ │ 'content': '{"type": "login", "last_login": "Never (first │ │
- │ │ login)", "time": "2023-10-30 02:14'+17 │ │
- │ │ │ } │ │
- │ │ ] │ │
- │ │ model = 'zephyr-7B-alpha' │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\agent.py:137 in │
- │ get_ai_reply_async │
- │ │
- │ 134 │ """Base call to GPT API w/ functions""" │
- │ 135 │ │
- │ 136 │ try: │
- │ > 137 │ │ response = await acreate( │
- │ 138 │ │ │ model=model, │
- │ 139 │ │ │ messages=message_sequence, │
- │ 140 │ │ │ functions=functions, │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ function_call = 'auto' │ │
- │ │ functions = [ │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ 'description': 'Sends a message to the human user', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'message': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Message contents. All unicode │ │
- │ │ (including emojis) are supported.' │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['message'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'pause_heartbeats', │ │
- │ │ │ │ 'description': 'Temporarily ignore timed heartbeats. You may │ │
- │ │ still receive messages from manual '+28, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'minutes': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Number of minutes to ignore │ │
- │ │ heartbeats for. Max value of 360 minutes (6 hours).' │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['minutes'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'core_memory_append', │ │
- │ │ │ │ 'description': 'Append to the contents of core memory.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Section of the memory to be edited │ │
- │ │ (persona or human).' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat after │ │
- │ │ function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'core_memory_replace', │ │
- │ │ │ │ 'description': 'Replace to the contents of core memory. To delete │ │
- │ │ memories, use an empty string '+16, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Section of the memory to be edited │ │
- │ │ (persona or human).' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'old_content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to replace. Must be an exact │ │
- │ │ match.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'new_content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat after │ │
- │ │ function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': [ │ │
- │ │ │ │ │ │ 'name', │ │
- │ │ │ │ │ │ 'old_content', │ │
- │ │ │ │ │ │ 'new_content', │ │
- │ │ │ │ │ │ 'request_heartbeat' │ │
- │ │ │ │ │ ] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'conversation_search', │ │
- │ │ │ │ 'description': 'Search prior conversation history using │ │
- │ │ case-insensitive string matching.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. │ │
- │ │ Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'conversation_search_date', │ │
- │ │ │ │ 'description': 'Search prior conversation history using a date │ │
- │ │ range.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'start_date': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': "The start of the date range to │ │
- │ │ search, in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'end_date': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': "The end of the date range to search, │ │
- │ │ in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. │ │
- │ │ Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'archival_memory_insert', │ │
- │ │ │ │ 'description': 'Add to archival memory. Make sure to phrase the │ │
- │ │ memory contents such that it can'+25, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'archival_memory_search', │ │
- │ │ │ │ 'description': 'Search archival memory using semantic │ │
- │ │ (embedding-based) search.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. │ │
- │ │ Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'query', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ } │ │
- │ │ ] │ │
- │ │ message_sequence = [ │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'system', │ │
- │ │ │ │ 'content': "You are MemGPT, the latest version of Limnal │ │
- │ │ Corporation's digital companion, de"+7218 │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ 'content': 'Bootup sequence complete. Persona activated. Testing │ │
- │ │ messaging functionality.', │ │
- │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'arguments': '{\n "message": "More human than human is our │ │
- │ │ motto."\n}' │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'function', │ │
- │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ 'content': '{"status": "OK", "message": null, "time": "2023-10-30 │ │
- │ │ 02:14:35 AM PDT-0700"}' │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'user', │ │
- │ │ │ │ 'content': '{"type": "login", "last_login": "Never (first │ │
- │ │ login)", "time": "2023-10-30 02:14'+17 │ │
- │ │ │ } │ │
- │ │ ] │ │
- │ │ model = 'zephyr-7B-alpha' │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\openai_tools.py:1 │
- │ 02 in wrapper │
- │ │
- │ 99 │ │ │ │
- │ 100 │ │ │ # Raise exceptions for any errors not specified │
- │ 101 │ │ │ except Exception as e: │
- │ > 102 │ │ │ │ raise e │
- │ 103 │ │
- │ 104 │ return wrapper │
- │ 105 │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ args = () │ │
- │ │ delay = 1 │ │
- │ │ errors = (<class 'openai.error.RateLimitError'>,) │ │
- │ │ exponential_base = 2 │ │
- │ │ func = <function acompletions_with_backoff at 0x000001A861B7A3E0> │ │
- │ │ initial_delay = 1 │ │
- │ │ jitter = True │ │
- │ │ kwargs = { │ │
- │ │ │ 'model': 'zephyr-7B-alpha', │ │
- │ │ │ 'messages': [ │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'system', │ │
- │ │ │ │ │ 'content': "You are MemGPT, the latest version of Limnal │ │
- │ │ Corporation's digital companion, de"+7218 │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ │ 'content': 'Bootup sequence complete. Persona activated. │ │
- │ │ Testing messaging functionality.', │ │
- │ │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ │ 'arguments': '{\n "message": "More human than human is │ │
- │ │ our motto."\n}' │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'function', │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'content': '{"status": "OK", "message": null, "time": │ │
- │ │ "2023-10-30 02:14:35 AM PDT-0700"}' │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'user', │ │
- │ │ │ │ │ 'content': '{"type": "login", "last_login": "Never (first │ │
- │ │ login)", "time": "2023-10-30 02:14'+17 │ │
- │ │ │ │ } │ │
- │ │ │ ], │ │
- │ │ │ 'functions': [ │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'description': 'Sends a message to the human user', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'message': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Message contents. All unicode │ │
- │ │ (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['message'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'pause_heartbeats', │ │
- │ │ │ │ │ 'description': 'Temporarily ignore timed heartbeats. You may │ │
- │ │ still receive messages from manual '+28, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'minutes': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Number of minutes to ignore │ │
- │ │ heartbeats for. Max value of 360 minutes (6 hours).' │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['minutes'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'core_memory_append', │ │
- │ │ │ │ │ 'description': 'Append to the contents of core memory.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Section of the memory to be │ │
- │ │ edited (persona or human).' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. │ │
- │ │ All unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat │ │
- │ │ after function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'core_memory_replace', │ │
- │ │ │ │ │ 'description': 'Replace to the contents of core memory. To │ │
- │ │ delete memories, use an empty string '+16, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Section of the memory to be │ │
- │ │ edited (persona or human).' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'old_content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to replace. Must be an │ │
- │ │ exact match.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'new_content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. │ │
- │ │ All unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat │ │
- │ │ after function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': [ │ │
- │ │ │ │ │ │ │ 'name', │ │
- │ │ │ │ │ │ │ 'old_content', │ │
- │ │ │ │ │ │ │ 'new_content', │ │
- │ │ │ │ │ │ │ 'request_heartbeat' │ │
- │ │ │ │ │ │ ] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'conversation_search', │ │
- │ │ │ │ │ 'description': 'Search prior conversation history using │ │
- │ │ case-insensitive string matching.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through │ │
- │ │ results. Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat │ │
- │ │ after function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'conversation_search_date', │ │
- │ │ │ │ │ 'description': 'Search prior conversation history using a │ │
- │ │ date range.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'start_date': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': "The start of the date range to │ │
- │ │ search, in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'end_date': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': "The end of the date range to │ │
- │ │ search, in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through │ │
- │ │ results. Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat │ │
- │ │ after function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'archival_memory_insert', │ │
- │ │ │ │ │ 'description': 'Add to archival memory. Make sure to phrase │ │
- │ │ the memory contents such that it can'+25, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. │ │
- │ │ All unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat │ │
- │ │ after function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'archival_memory_search', │ │
- │ │ │ │ │ 'description': 'Search archival memory using semantic │ │
- │ │ (embedding-based) search.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through │ │
- │ │ results. Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat │ │
- │ │ after function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': [ │ │
- │ │ │ │ │ │ │ 'name', │ │
- │ │ │ │ │ │ │ 'query', │ │
- │ │ │ │ │ │ │ 'page', │ │
- │ │ │ │ │ │ │ 'request_heartbeat' │ │
- │ │ │ │ │ │ ] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ } │ │
- │ │ │ ], │ │
- │ │ │ 'function_call': 'auto' │ │
- │ │ } │ │
- │ │ max_retries = 20 │ │
- │ │ num_retries = 0 │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\openai_tools.py:8 │
- │ 2 in wrapper │
- │ │
- │ 79 │ │ # Loop until a successful response or max_retries is hit or an exception is rais │
- │ 80 │ │ while True: │
- │ 81 │ │ │ try: │
- │ > 82 │ │ │ │ return await func(*args, **kwargs) │
- │ 83 │ │ │ │
- │ 84 │ │ │ # Retry on specified errors │
- │ 85 │ │ │ except errors as e: │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ args = () │ │
- │ │ delay = 1 │ │
- │ │ errors = (<class 'openai.error.RateLimitError'>,) │ │
- │ │ exponential_base = 2 │ │
- │ │ func = <function acompletions_with_backoff at 0x000001A861B7A3E0> │ │
- │ │ initial_delay = 1 │ │
- │ │ jitter = True │ │
- │ │ kwargs = { │ │
- │ │ │ 'model': 'zephyr-7B-alpha', │ │
- │ │ │ 'messages': [ │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'system', │ │
- │ │ │ │ │ 'content': "You are MemGPT, the latest version of Limnal │ │
- │ │ Corporation's digital companion, de"+7218 │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ │ 'content': 'Bootup sequence complete. Persona activated. │ │
- │ │ Testing messaging functionality.', │ │
- │ │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ │ 'arguments': '{\n "message": "More human than human is │ │
- │ │ our motto."\n}' │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'function', │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'content': '{"status": "OK", "message": null, "time": │ │
- │ │ "2023-10-30 02:14:35 AM PDT-0700"}' │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'user', │ │
- │ │ │ │ │ 'content': '{"type": "login", "last_login": "Never (first │ │
- │ │ login)", "time": "2023-10-30 02:14'+17 │ │
- │ │ │ │ } │ │
- │ │ │ ], │ │
- │ │ │ 'functions': [ │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'description': 'Sends a message to the human user', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'message': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Message contents. All unicode │ │
- │ │ (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['message'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'pause_heartbeats', │ │
- │ │ │ │ │ 'description': 'Temporarily ignore timed heartbeats. You may │ │
- │ │ still receive messages from manual '+28, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'minutes': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Number of minutes to ignore │ │
- │ │ heartbeats for. Max value of 360 minutes (6 hours).' │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['minutes'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'core_memory_append', │ │
- │ │ │ │ │ 'description': 'Append to the contents of core memory.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Section of the memory to be │ │
- │ │ edited (persona or human).' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. │ │
- │ │ All unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat │ │
- │ │ after function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'core_memory_replace', │ │
- │ │ │ │ │ 'description': 'Replace to the contents of core memory. To │ │
- │ │ delete memories, use an empty string '+16, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Section of the memory to be │ │
- │ │ edited (persona or human).' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'old_content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to replace. Must be an │ │
- │ │ exact match.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'new_content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. │ │
- │ │ All unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat │ │
- │ │ after function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': [ │ │
- │ │ │ │ │ │ │ 'name', │ │
- │ │ │ │ │ │ │ 'old_content', │ │
- │ │ │ │ │ │ │ 'new_content', │ │
- │ │ │ │ │ │ │ 'request_heartbeat' │ │
- │ │ │ │ │ │ ] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'conversation_search', │ │
- │ │ │ │ │ 'description': 'Search prior conversation history using │ │
- │ │ case-insensitive string matching.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through │ │
- │ │ results. Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat │ │
- │ │ after function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'conversation_search_date', │ │
- │ │ │ │ │ 'description': 'Search prior conversation history using a │ │
- │ │ date range.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'start_date': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': "The start of the date range to │ │
- │ │ search, in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'end_date': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': "The end of the date range to │ │
- │ │ search, in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through │ │
- │ │ results. Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat │ │
- │ │ after function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'archival_memory_insert', │ │
- │ │ │ │ │ 'description': 'Add to archival memory. Make sure to phrase │ │
- │ │ the memory contents such that it can'+25, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. │ │
- │ │ All unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat │ │
- │ │ after function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'archival_memory_search', │ │
- │ │ │ │ │ 'description': 'Search archival memory using semantic │ │
- │ │ (embedding-based) search.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through │ │
- │ │ results. Only use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat │ │
- │ │ after function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': [ │ │
- │ │ │ │ │ │ │ 'name', │ │
- │ │ │ │ │ │ │ 'query', │ │
- │ │ │ │ │ │ │ 'page', │ │
- │ │ │ │ │ │ │ 'request_heartbeat' │ │
- │ │ │ │ │ │ ] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ } │ │
- │ │ │ ], │ │
- │ │ │ 'function_call': 'auto' │ │
- │ │ } │ │
- │ │ max_retries = 20 │ │
- │ │ num_retries = 0 │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\openai_tools.py:1 │
- │ 11 in acompletions_with_backoff │
- │ │
- │ 108 async def acompletions_with_backoff(**kwargs): │
- │ 109 │ # Local model │
- │ 110 │ if HOST_TYPE is not None: │
- │ > 111 │ │ return await get_chat_completion(**kwargs) │
- │ 112 │ │
- │ 113 │ # OpenAI / Azure model │
- │ 114 │ else: │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ kwargs = { │ │
- │ │ │ 'model': 'zephyr-7B-alpha', │ │
- │ │ │ 'messages': [ │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'system', │ │
- │ │ │ │ │ 'content': "You are MemGPT, the latest version of Limnal Corporation's │ │
- │ │ digital companion, de"+7218 │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ │ 'content': 'Bootup sequence complete. Persona activated. Testing │ │
- │ │ messaging functionality.', │ │
- │ │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ │ 'arguments': '{\n "message": "More human than human is our │ │
- │ │ motto."\n}' │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'function', │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'content': '{"status": "OK", "message": null, "time": "2023-10-30 │ │
- │ │ 02:14:35 AM PDT-0700"}' │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'role': 'user', │ │
- │ │ │ │ │ 'content': '{"type": "login", "last_login": "Never (first login)", │ │
- │ │ "time": "2023-10-30 02:14'+17 │ │
- │ │ │ │ } │ │
- │ │ │ ], │ │
- │ │ │ 'functions': [ │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'description': 'Sends a message to the human user', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'message': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Message contents. All unicode (including │ │
- │ │ emojis) are supported.' │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['message'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'pause_heartbeats', │ │
- │ │ │ │ │ 'description': 'Temporarily ignore timed heartbeats. You may still │ │
- │ │ receive messages from manual '+28, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'minutes': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Number of minutes to ignore heartbeats for. │ │
- │ │ Max value of 360 minutes (6 hours).' │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['minutes'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'core_memory_append', │ │
- │ │ │ │ │ 'description': 'Append to the contents of core memory.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Section of the memory to be edited (persona │ │
- │ │ or human).' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All unicode │ │
- │ │ (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat after │ │
- │ │ function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'core_memory_replace', │ │
- │ │ │ │ │ 'description': 'Replace to the contents of core memory. To delete │ │
- │ │ memories, use an empty string '+16, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Section of the memory to be edited (persona │ │
- │ │ or human).' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'old_content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to replace. Must be an exact match.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'new_content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All unicode │ │
- │ │ (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat after │ │
- │ │ function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': [ │ │
- │ │ │ │ │ │ │ 'name', │ │
- │ │ │ │ │ │ │ 'old_content', │ │
- │ │ │ │ │ │ │ 'new_content', │ │
- │ │ │ │ │ │ │ 'request_heartbeat' │ │
- │ │ │ │ │ │ ] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'conversation_search', │ │
- │ │ │ │ │ 'description': 'Search prior conversation history using │ │
- │ │ case-insensitive string matching.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through results. Only │ │
- │ │ use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'conversation_search_date', │ │
- │ │ │ │ │ 'description': 'Search prior conversation history using a date range.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'start_date': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': "The start of the date range to search, in │ │
- │ │ the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'end_date': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': "The end of the date range to search, in the │ │
- │ │ format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through results. Only │ │
- │ │ use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'archival_memory_insert', │ │
- │ │ │ │ │ 'description': 'Add to archival memory. Make sure to phrase the memory │ │
- │ │ contents such that it can'+25, │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All unicode │ │
- │ │ (including emojis) are supported.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ }, │ │
- │ │ │ │ { │ │
- │ │ │ │ │ 'name': 'archival_memory_search', │ │
- │ │ │ │ │ 'description': 'Search archival memory using semantic (embedding-based) │ │
- │ │ search.', │ │
- │ │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ │ 'description': 'Allows you to page through results. Only │ │
- │ │ use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ │ } │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'required': ['name', 'query', 'page', 'request_heartbeat'] │ │
- │ │ │ │ │ } │ │
- │ │ │ │ } │ │
- │ │ │ ], │ │
- │ │ │ 'function_call': 'auto' │ │
- │ │ } │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\local_llm\chat_co │
- │ mpletion_proxy.py:57 in get_chat_completion │
- │ │
- │ 54 │ if result is None or result == "": │
- │ 55 │ │ raise Exception(f"Got back an empty response string from {HOST}") │
- │ 56 │ │
- │ > 57 │ chat_completion_result = llm_wrapper.output_to_chat_completion_response(result) │
- │ 58 │ if DEBUG: │
- │ 59 │ │ print(json.dumps(chat_completion_result, indent=2)) │
- │ 60 │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ function_call = 'auto' │ │
- │ │ functions = [ │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ 'description': 'Sends a message to the human user', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'message': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Message contents. All unicode (including │ │
- │ │ emojis) are supported.' │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['message'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'pause_heartbeats', │ │
- │ │ │ │ 'description': 'Temporarily ignore timed heartbeats. You may still │ │
- │ │ receive messages from manual '+28, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'minutes': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Number of minutes to ignore heartbeats │ │
- │ │ for. Max value of 360 minutes (6 hours).' │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['minutes'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'core_memory_append', │ │
- │ │ │ │ 'description': 'Append to the contents of core memory.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Section of the memory to be edited │ │
- │ │ (persona or human).' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat after │ │
- │ │ function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'core_memory_replace', │ │
- │ │ │ │ 'description': 'Replace to the contents of core memory. To delete │ │
- │ │ memories, use an empty string '+16, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'name': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Section of the memory to be edited │ │
- │ │ (persona or human).' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'old_content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to replace. Must be an exact │ │
- │ │ match.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'new_content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': 'Request an immediate heartbeat after │ │
- │ │ function execution, use to chain multiple f'+9 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': [ │ │
- │ │ │ │ │ │ 'name', │ │
- │ │ │ │ │ │ 'old_content', │ │
- │ │ │ │ │ │ 'new_content', │ │
- │ │ │ │ │ │ 'request_heartbeat' │ │
- │ │ │ │ │ ] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'conversation_search', │ │
- │ │ │ │ 'description': 'Search prior conversation history using │ │
- │ │ case-insensitive string matching.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. Only │ │
- │ │ use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'conversation_search_date', │ │
- │ │ │ │ 'description': 'Search prior conversation history using a date │ │
- │ │ range.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'start_date': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': "The start of the date range to search, │ │
- │ │ in the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'end_date': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': "The end of the date range to search, in │ │
- │ │ the format 'YYYY-MM-DD'." │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. Only │ │
- │ │ use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'archival_memory_insert', │ │
- │ │ │ │ 'description': 'Add to archival memory. Make sure to phrase the │ │
- │ │ memory contents such that it can'+25, │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'content': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'Content to write to the memory. All │ │
- │ │ unicode (including emojis) are supported.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'content', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'name': 'archival_memory_search', │ │
- │ │ │ │ 'description': 'Search archival memory using semantic │ │
- │ │ (embedding-based) search.', │ │
- │ │ │ │ 'parameters': { │ │
- │ │ │ │ │ 'type': 'object', │ │
- │ │ │ │ │ 'properties': { │ │
- │ │ │ │ │ │ 'query': { │ │
- │ │ │ │ │ │ │ 'type': 'string', │ │
- │ │ │ │ │ │ │ 'description': 'String to search for.' │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'page': { │ │
- │ │ │ │ │ │ │ 'type': 'integer', │ │
- │ │ │ │ │ │ │ 'description': 'Allows you to page through results. Only │ │
- │ │ use on a follow-up query. Defaults to 0'+14 │ │
- │ │ │ │ │ │ }, │ │
- │ │ │ │ │ │ 'request_heartbeat': { │ │
- │ │ │ │ │ │ │ 'type': 'boolean', │ │
- │ │ │ │ │ │ │ 'description': "Request an immediate heartbeat after │ │
- │ │ function execution. Set to 'true' if you wa"+59 │ │
- │ │ │ │ │ │ } │ │
- │ │ │ │ │ }, │ │
- │ │ │ │ │ 'required': ['name', 'query', 'page', 'request_heartbeat'] │ │
- │ │ │ │ } │ │
- │ │ │ } │ │
- │ │ ] │ │
- │ │ llm_wrapper = <memgpt.local_llm.llm_chat_completion_wrappers.zephyr.ZephyrMistralInnerMon… │ │
- │ │ object at 0x000001A8C84ADF10> │ │
- │ │ messages = [ │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'system', │ │
- │ │ │ │ 'content': "You are MemGPT, the latest version of Limnal │ │
- │ │ Corporation's digital companion, de"+7218 │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'assistant', │ │
- │ │ │ │ 'content': 'Bootup sequence complete. Persona activated. Testing │ │
- │ │ messaging functionality.', │ │
- │ │ │ │ 'function_call': { │ │
- │ │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ │ 'arguments': '{\n "message": "More human than human is our │ │
- │ │ motto."\n}' │ │
- │ │ │ │ } │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'function', │ │
- │ │ │ │ 'name': 'send_message', │ │
- │ │ │ │ 'content': '{"status": "OK", "message": null, "time": "2023-10-30 │ │
- │ │ 02:14:35 AM PDT-0700"}' │ │
- │ │ │ }, │ │
- │ │ │ { │ │
- │ │ │ │ 'role': 'user', │ │
- │ │ │ │ 'content': '{"type": "login", "last_login": "Never (first login)", │ │
- │ │ "time": "2023-10-30 02:14'+17 │ │
- │ │ │ } │ │
- │ │ ] │ │
- │ │ model = 'zephyr-7B-alpha' │ │
- │ │ prompt = "You are MemGPT, the latest version of Limnal Corporation's digital │ │
- │ │ companion, de"+11363 │ │
- │ │ result = ' "function": "core_memory_append",\n "params": {\n "inner_thoughts": │ │
- │ │ "User \'C'+442 │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- │ │
- │ C:\Users\ivan\AppData\Local\Programs\Python\Python311\Lib\site-packages\memgpt\local_llm\llm_cha │
- │ t_completion_wrappers\zephyr.py:316 in output_to_chat_completion_response │
- │ │
- │ 313 │ │ │ try: │
- │ 314 │ │ │ │ function_json_output = json.loads(raw_llm_output + "\n}") │
- │ 315 │ │ │ except: │
- │ > 316 │ │ │ │ raise Exception(f"Failed to decode JSON from LLM output:\n{raw_llm_outpu │
- │ 317 │ │ function_name = function_json_output["function"] │
- │ 318 │ │ function_parameters = function_json_output["params"] │
- │ 319 │
- │ │
- │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
- │ │ raw_llm_output = '{ "function": "core_memory_append",\n "params": {\n "inner_thoughts": │ │
- │ │ "User \''+443 │ │
- │ │ self = <memgpt.local_llm.llm_chat_completion_wrappers.zephyr.ZephyrMistralInnerMo… │ │
- │ │ object at 0x000001A8C84ADF10> │ │
- │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
- └──────────────────────────────────────────────────────────────────────────────────────────────────┘
- Exception: Failed to decode JSON from LLM output:
- { "function": "core_memory_append",
- "params": {
- "inner_thoughts": "User 'Chad' (human) has successfully logged into the system. User information added to core memory.",
- "name": "user_details",
- "content": `{
- "firstName": "Chad",
- "lastName": null,
- "gender": "Male",
- "age": null,
- "nationality": null,
- "occupation": "Computer Science PhD student at UC Berkeley",
- "interests": ["Formula 1", "Sailing", "Taste of the Himalayas Restaurant in Berkeley", "CSGO"]
- }`
- }
- }
- C:\IA\MEMGpt>
Advertisement
Add Comment
Please, Sign In to add comment