Skip to content

Commit

Permalink
docs: Mem0 Integration (#1216)
Browse files Browse the repository at this point in the history
Co-authored-by: Anush  <[email protected]>
  • Loading branch information
Dev-Khant and Anush008 authored Oct 5, 2024
1 parent dcb0a91 commit e639d55
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions qdrant-landing/content/documentation/frameworks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ weight: 20
| [Langchain-Go](/documentation/frameworks/langchain-go/) | Go framework for building context-aware, reasoning applications using LLMs. |
| [Langchain4j](/documentation/frameworks/langchain4j/) | Java framework for building context-aware, reasoning applications using LLMs. |
| [LlamaIndex](/documentation/frameworks/llama-index/) | A data framework for building LLM applications with modular integrations. |
| [Mem0](/documentation/frameworks/mem0/) | Self-improving memory layer for LLM applications, enabling personalized AI experiences. |
| [MemGPT](/documentation/frameworks/memgpt/) | System to build LLM agents with long term memory & custom tools |
| [Pandas-AI](/documentation/frameworks/pandas-ai/) | Python library to query/visualize your data (CSV, XLSX, PostgreSQL, etc.) in natural language |
| [Semantic Router](/documentation/frameworks/semantic-router/) | Python library to build a decision-making layer for AI applications using vector search. |
Expand Down
66 changes: 66 additions & 0 deletions qdrant-landing/content/documentation/frameworks/mem0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Mem0
---

![Mem0 Logo](/documentation/frameworks/mem0/mem0-banner.png)

[Mem0](https://mem0.ai) is a self-improving memory layer for LLM applications, enabling personalized AI experiences that save costs and delight users. Mem0 remembers user preferences, adapts to individual needs, and continuously improves over time, ideal for chatbots and AI systems.

Mem0 supports various vector store providers, including Qdrant, for efficient data handling and search capabilities.

## Installation

To install Mem0 with Qdrant support, use the following command:

```sh
pip install mem0ai
```

## Usage

Here's a basic example of how to use Mem0 with Qdrant:

```python
import os
from mem0 import Memory

os.environ["OPENAI_API_KEY"] = "sk-xx"

config = {
"vector_store": {
"provider": "qdrant",
"config": {
"collection_name": "test",
"host": "localhost",
"port": 6333,
}
}
}

m = Memory.from_config(config)
m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category": "hobbies"})
```

## Configuration

When configuring Mem0 to use Qdrant as the vector store, you can specify [various parameters](https://docs.mem0.ai/components/vectordbs/dbs/qdrant#config) in the `config` dictionary.

## Advanced Usage

Mem0 provides additional functionality for managing and querying your vector data. Here are some examples:

```python
# Search memories
related_memories = m.search(query="What are Alice's hobbies?", user_id="alice")

# Update existing memory
result = m.update(memory_id="m1", data="Likes to play tennis on weekends")

# Get memory history
history = m.history(memory_id="m1")
```

## Further Reading

- [Mem0 GitHub Repository](https://github.com/mem0ai/mem0)
- [Mem0 Documentation](https://docs.mem0.ai/).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e639d55

Please sign in to comment.