Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: add back `memgpt/configs` folder (#1431)
Sarah Wooders8eba90c97f40
diff --git a/memgpt/cli/cli.py b/memgpt/cli/cli.pyindex cd490820f..12ac3a709 100644--- a/memgpt/cli/cli.py+++ b/memgpt/cli/cli.py@@ -162,7 +162,7 @@ def quickstart(# Load the file from the relative pathscript_dir = os.path.dirname(__file__) # Get the directory where the script is located- backup_config_path = os.path.join(script_dir, "..", "..", "configs", "memgpt_hosted.json")+ backup_config_path = os.path.join(script_dir, "..", "configs", "memgpt_hosted.json")try:with open(backup_config_path, "r", encoding="utf-8") as file:backup_config = json.load(file)@@ -175,7 +175,7 @@ def quickstart(# Load the file from the relative pathscript_dir = os.path.dirname(__file__) # Get the directory where the script is located# print("SCRIPT", script_dir)- backup_config_path = os.path.join(script_dir, "..", "..", "configs", "memgpt_hosted.json")+ backup_config_path = os.path.join(script_dir, "..", "configs", "memgpt_hosted.json")# print("FILE PATH", backup_config_path)try:with open(backup_config_path, "r", encoding="utf-8") as file:@@ -214,7 +214,7 @@ def quickstart(# Load the file from the relative pathscript_dir = os.path.dirname(__file__) # Get the directory where the script is located- backup_config_path = os.path.join(script_dir, "..", "..", "configs", "openai.json")+ backup_config_path = os.path.join(script_dir, "..", "configs", "openai.json")try:with open(backup_config_path, "r", encoding="utf-8") as file:backup_config = json.load(file)@@ -226,7 +226,7 @@ def quickstart(else:# Load the file from the relative pathscript_dir = os.path.dirname(__file__) # Get the directory where the script is located- backup_config_path = os.path.join(script_dir, "..", "..", "configs", "openai.json")+ backup_config_path = os.path.join(script_dir, "..", "configs", "openai.json")try:with open(backup_config_path, "r", encoding="utf-8") as file:backup_config = json.load(file)diff --git a/memgpt/configs/memgpt_hosted.json b/memgpt/configs/memgpt_hosted.jsonnew file mode 100644index 000000000..3fd85a4c1--- /dev/null+++ b/memgpt/configs/memgpt_hosted.json@@ -0,0 +1,11 @@+{+ "context_window": 8192,+ "model_endpoint_type": "openai",+ "model_endpoint": "https://inference.memgpt.ai",+ "model": "memgpt-openai",+ "embedding_endpoint_type": "hugging-face",+ "embedding_endpoint": "https://embeddings.memgpt.ai",+ "embedding_model": "BAAI/bge-large-en-v1.5",+ "embedding_dim": 1024,+ "embedding_chunk_size": 300+}diff --git a/memgpt/configs/openai.json b/memgpt/configs/openai.jsonnew file mode 100644index 000000000..82ed0d72e--- /dev/null+++ b/memgpt/configs/openai.json@@ -0,0 +1,12 @@+{+ "context_window": 8192,+ "model": "gpt-4",+ "model_endpoint_type": "openai",+ "model_endpoint": "https://api.openai.com/v1",+ "model_wrapper": null,+ "embedding_endpoint_type": "openai",+ "embedding_endpoint": "https://api.openai.com/v1",+ "embedding_model": "text-embedding-ada-002",+ "embedding_dim": 1536,+ "embedding_chunk_size": 300+}diff --git a/tests/test_quickstart.py b/tests/test_quickstart.pynew file mode 100644index 000000000..2308c219e--- /dev/null+++ b/tests/test_quickstart.py@@ -0,0 +1,17 @@+from memgpt.cli.cli import QuickstartChoice, quickstart+from memgpt.config import MemGPTConfig+++def test_quickstart():++ # openai+ quickstart(QuickstartChoice.openai, debug=True, terminal=False)+ config = MemGPTConfig.load()+ assert config.default_llm_config.model_endpoint_type == "openai"+ assert config.default_embedding_config.embedding_endpoint_type == "openai"++ # memgpt+ quickstart(QuickstartChoice.memgpt_hosted, debug=True, terminal=False)+ config = MemGPTConfig.load()+ assert config.default_llm_config.model_endpoint == "https://inference.memgpt.ai"+ assert config.default_embedding_config.embedding_endpoint == "https://embeddings.memgpt.ai"