Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
moved configs for hosted to https, patched bug in embedding creation (#685)
Charles Packer34e36ad8ef8d
diff --git a/configs/memgpt_hosted.json b/configs/memgpt_hosted.jsonindex 2e8bcf7b5..e7958cfa6 100644--- a/configs/memgpt_hosted.json+++ b/configs/memgpt_hosted.json@@ -2,10 +2,10 @@"context_window": 32768,"model": "ehartford/dolphin-2.5-mixtral-8x7b","model_endpoint_type": "vllm",- "model_endpoint": "http://api.memgpt.ai",+ "model_endpoint": "https://api.memgpt.ai","model_wrapper": "chatml","embedding_endpoint_type": "hugging-face",- "embedding_endpoint": "http://embeddings.memgpt.ai",+ "embedding_endpoint": "https://embeddings.memgpt.ai","embedding_model": "BAAI/bge-large-en-v1.5","embedding_dim": 1536,"embedding_chunk_size": 300diff --git a/memgpt/configs/memgpt_hosted.json b/memgpt/configs/memgpt_hosted.jsonindex 2e8bcf7b5..e7958cfa6 100644--- a/memgpt/configs/memgpt_hosted.json+++ b/memgpt/configs/memgpt_hosted.json@@ -2,10 +2,10 @@"context_window": 32768,"model": "ehartford/dolphin-2.5-mixtral-8x7b","model_endpoint_type": "vllm",- "model_endpoint": "http://api.memgpt.ai",+ "model_endpoint": "https://api.memgpt.ai","model_wrapper": "chatml","embedding_endpoint_type": "hugging-face",- "embedding_endpoint": "http://embeddings.memgpt.ai",+ "embedding_endpoint": "https://embeddings.memgpt.ai","embedding_model": "BAAI/bge-large-en-v1.5","embedding_dim": 1536,"embedding_chunk_size": 300diff --git a/memgpt/memory.py b/memgpt/memory.pyindex 2aa4842ca..5c0f7d79f 100644--- a/memgpt/memory.py+++ b/memgpt/memory.py@@ -338,6 +338,16 @@ class EmbeddingArchivalMemory(ArchivalMemory):# breakup string into passagesfor node in parser.get_nodes_from_documents([Document(text=memory_string)]):embedding = self.embed_model.get_text_embedding(node.text)+ # fixing weird bug where type returned isn't a list, but instead is an object+ # eg: embedding={'object': 'list', 'data': [{'object': 'embedding', 'embedding': [-0.0071973633, -0.07893023,+ if isinstance(embedding, dict):+ try:+ embedding = embedding["data"][0]["embedding"]+ except (KeyError, IndexError):+ # TODO as a fallback, see if we can find any lists in the payload+ raise TypeError(+ f"Got back an unexpected payload from text embedding function, type={type(embedding)}, value={embedding}"+ )passages.append(Passage(text=node.text, embedding=embedding, doc_id=f"agent_{self.agent_config.name}_memory"))# insert passages