mem0
mem0 copied to clipboard
ERROR:root:Error in new_memories_with_actions:
🐛 Describe the bug
I get this error when adding a few paragraphs of text to the memories. Each text is about 6~8 sentences.
for text in texts:
m.add(text, user="user-1")
ERROR:root:Error in new_memories_with_actions: '9'
{'results': []}
This is the final output, so no memories are added.
I think I found the issues. mem0 fails when the added text as more than 100 characters long.
config = {
"llm": {
"provider": "ollama",
"config": {
"model": "mistral-nemo",
"temperature": 0.1,
"max_tokens": 2000,
}
},
"embedder": {
"provider": "ollama",
"model": "verdx/gte-base-zh",
"embedding_dims": 768,
"max_tokens": 2000,
},
"vector_store": {
"config": {
"collection_name": "test",
"path": r"C:\Users\win_user\tmp",
"embedding_model_dims":768,
},
},
}
try:
memory = Memory.from_config(config)
except:
pass
messages = []
# Character cards
for name, card in characters_cards.items():
user = {"role": "user", "content": f"{name}, Character Card"}
assisant = {"role": "assistant", "content": f"{card[:100]}"}
messages.append(user)
messages.append(assisant)
counter += 1
memory.add(messages, user_id="user_1")
Here is my full code.
@CHesketh76 This has been fixed with the new version of mem0ai. You can try and test it out.