Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
patch bug where None.copy() throws runtime error (#617)
Charles Packer490c0ccd4a8b
diff --git a/memgpt/local_llm/llm_chat_completion_wrappers/airoboros.py b/memgpt/local_llm/llm_chat_completion_wrappers/airoboros.pyindex ac3e0c6d2..bf838f040 100644--- a/memgpt/local_llm/llm_chat_completion_wrappers/airoboros.py+++ b/memgpt/local_llm/llm_chat_completion_wrappers/airoboros.py@@ -158,7 +158,7 @@ class Airoboros21Wrapper(LLMChatCompletionWrapper):def clean_function_args(self, function_name, function_args):"""Some basic MemGPT-specific cleaning of function args"""cleaned_function_name = function_name- cleaned_function_args = function_args.copy()+ cleaned_function_args = function_args.copy() if function_args is not None else {}if function_name == "send_message":# strip request_heartbeat@@ -379,7 +379,7 @@ class Airoboros21InnerMonologueWrapper(Airoboros21Wrapper):def clean_function_args(self, function_name, function_args):"""Some basic MemGPT-specific cleaning of function args"""cleaned_function_name = function_name- cleaned_function_args = function_args.copy()+ cleaned_function_args = function_args.copy() if function_args is not None else {}if function_name == "send_message":# strip request_heartbeatdiff --git a/memgpt/local_llm/llm_chat_completion_wrappers/dolphin.py b/memgpt/local_llm/llm_chat_completion_wrappers/dolphin.pyindex e1516e9fa..fd8dabcde 100644--- a/memgpt/local_llm/llm_chat_completion_wrappers/dolphin.py+++ b/memgpt/local_llm/llm_chat_completion_wrappers/dolphin.py@@ -193,7 +193,7 @@ class Dolphin21MistralWrapper(LLMChatCompletionWrapper):def clean_function_args(self, function_name, function_args):"""Some basic MemGPT-specific cleaning of function args"""cleaned_function_name = function_name- cleaned_function_args = function_args.copy()+ cleaned_function_args = function_args.copy() if function_args is not None else {}if function_name == "send_message":# strip request_heartbeatdiff --git a/memgpt/local_llm/llm_chat_completion_wrappers/zephyr.py b/memgpt/local_llm/llm_chat_completion_wrappers/zephyr.pyindex 83005254d..7b635c1fd 100644--- a/memgpt/local_llm/llm_chat_completion_wrappers/zephyr.py+++ b/memgpt/local_llm/llm_chat_completion_wrappers/zephyr.py@@ -124,7 +124,7 @@ class ZephyrMistralWrapper(LLMChatCompletionWrapper):def clean_function_args(self, function_name, function_args):"""Some basic MemGPT-specific cleaning of function args"""cleaned_function_name = function_name- cleaned_function_args = function_args.copy()+ cleaned_function_args = function_args.copy() if function_args is not None else {}if function_name == "send_message":# strip request_heartbeat@@ -283,7 +283,7 @@ class ZephyrMistralInnerMonologueWrapper(ZephyrMistralWrapper):def clean_function_args(self, function_name, function_args):"""Some basic MemGPT-specific cleaning of function args"""cleaned_function_name = function_name- cleaned_function_args = function_args.copy()+ cleaned_function_args = function_args.copy() if function_args is not None else {}if function_name == "send_message":# strip request_heartbeat