Embedding Providers
FreshMem0 supports 12+ embedding model providers. OpenAI is the default.
Language Support
Python supports all providers. TypeScript currently supports OpenAI only.
Supported Providers
| Provider | Python | TypeScript |
|---|---|---|
| OpenAI | Yes | Yes |
| Azure OpenAI | Yes | No |
| Ollama | Yes | No |
| Hugging Face | Yes | No |
| Google AI | Yes | No |
| Vertex AI | Yes | No |
| Together | Yes | No |
| LM Studio | Yes | No |
| LangChain | Yes | No |
| AWS Bedrock | Yes | No |
Configuration
python
from mem0 import Memory
config = {
"embedder": {
"provider": "openai",
"config": {
"model": "text-embedding-3-small",
}
}
}
memory = Memory.from_config(config)1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Provider Examples
OpenAI (Default)
python
config = {
"embedder": {
"provider": "openai",
"config": {
"model": "text-embedding-3-small",
}
}
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Ollama (Local)
python
config = {
"embedder": {
"provider": "ollama",
"config": {
"model": "nomic-embed-text",
}
}
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Hugging Face
python
config = {
"embedder": {
"provider": "huggingface",
"config": {
"model": "sentence-transformers/all-MiniLM-L6-v2",
}
}
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Azure OpenAI
python
config = {
"embedder": {
"provider": "azure_openai",
"config": {
"model": "text-embedding-ada-002",
"api_key": "your-azure-key",
"azure_deployment": "your-deployment",
"azure_endpoint": "https://your-resource.openai.azure.com/",
}
}
}1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Google AI
python
config = {
"embedder": {
"provider": "google_ai",
"config": {
"model": "models/embedding-001",
}
}
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Vertex AI
python
config = {
"embedder": {
"provider": "vertexai",
"config": {
"model": "textembedding-gecko@003",
}
}
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
AWS Bedrock
python
config = {
"embedder": {
"provider": "aws_bedrock",
"config": {
"model": "amazon.titan-embed-text-v1",
"region": "us-east-1",
}
}
}1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9