Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defauly "Getting Started" fails. #2079

Closed
danpe opened this issue Dec 9, 2024 · 1 comment
Closed

Defauly "Getting Started" fails. #2079

danpe opened this issue Dec 9, 2024 · 1 comment

Comments

@danpe
Copy link

danpe commented Dec 9, 2024

🐛 Describe the bug

Following the mem0 getting started guide just fails.

from mem0 import MemoryClient

#os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")

client = MemoryClient(api_key="m0-AFawByIj1vSI5tMocpXtk7BoJKVm0pXzVLo3MMkV")

messages = [
    {"role": "user", "content": "Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts."},
    {"role": "assistant", "content": "Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions."}
]
client.add(messages, user_id="alex")

query = "What can I cook for dinner tonight?"
client.search(query, user_id="alex")

And I get the following exception:

mem0/configs/llms/base.py", line 22, in BaseLlmConfig
    models: Optional[list[str]] = None,
TypeError: 'type' object is not subscriptable
@Dev-Khant
Copy link
Member

Hey, the code mentioned by you works properly now. Please check it again.
Closing this issue, feel free to open it if issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants