Skip to content

Commit dcacc5e

Browse files
committed
refactor: rename Lang Memory to Mem4j
1 parent fe2ecfa commit dcacc5e

34 files changed

+158
-158
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
blank_issues_enabled: false
1717
contact_links:
1818
- name: Community Support
19-
url: https://github.com/LangMem/lang-memory/discussions
19+
url: https://github.com/Mem4j/mem4j/discussions
2020
about: Please ask and answer questions here.

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ COPY src ./src
3636
RUN ./mvnw clean package -DskipTests
3737

3838
# Create non-root user
39-
RUN groupadd -r langmem && useradd -r -g langmem langmem
39+
RUN groupadd -r mem4j && useradd -r -g mem4j mem4j
4040

4141
# Create logs directory
42-
RUN mkdir -p /app/logs && chown -R langmem:langmem /app
42+
RUN mkdir -p /app/logs && chown -R mem4j:mem4j /app
4343

4444
# Switch to non-root user
45-
USER langmem
45+
USER mem4j
4646

4747
# Expose port
4848
EXPOSE 8080
@@ -51,4 +51,4 @@ EXPOSE 8080
5151
ENV JAVA_OPTS="-Xmx512m -Xms256m"
5252

5353
# Run the application
54-
CMD ["sh", "-c", "java $JAVA_OPTS -jar target/lang-memory-0.1.0.jar"]
54+
CMD ["sh", "-c", "java $JAVA_OPTS -jar target/mem4j-0.1.0.jar"]

QUICK_START.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# 🚀 Lang Memory 快速开始
1+
# 🚀 Mem4j 快速开始
22

33
## 📦 安装库到本地仓库
44

5-
首先,将 Lang Memory 安装到你的本地 Maven 仓库:
5+
首先,将 Mem4j 安装到你的本地 Maven 仓库:
66

77
```bash
88
# 克隆仓库
9-
git clone https://github.com/LangMem/lang-memory.git
10-
cd lang-memory
9+
git clone https://github.com/Mem4j/mem4j.git
10+
cd mem4j
1111

1212
# 安装到本地Maven仓库
1313
mvn clean install -DskipTests
@@ -20,11 +20,11 @@ mvn clean install -DskipTests
2020
```bash
2121
mvn archetype:generate \
2222
-DgroupId=com.example \
23-
-DartifactId=my-lang-memory-app \
23+
-DartifactId=my-mem4j-app \
2424
-DarchetypeArtifactId=maven-archetype-quickstart \
2525
-DinteractiveMode=false
2626

27-
cd my-lang-memory-app
27+
cd my-mem4j-app
2828
```
2929

3030
### 2. 修改 pom.xml
@@ -38,7 +38,7 @@ cd my-lang-memory-app
3838
<modelVersion>4.0.0</modelVersion>
3939

4040
<groupId>com.example</groupId>
41-
<artifactId>my-lang-memory-app</artifactId>
41+
<artifactId>my-mem4j-app</artifactId>
4242
<version>1.0.0</version>
4343
<packaging>jar</packaging>
4444

@@ -57,10 +57,10 @@ cd my-lang-memory-app
5757
<version>${spring.boot.version}</version>
5858
</dependency>
5959

60-
<!-- Lang Memory -->
60+
<!-- Mem4j -->
6161
<dependency>
62-
<groupId>com.langmem</groupId>
63-
<artifactId>lang-memory</artifactId>
62+
<groupId>com.mem4j</groupId>
63+
<artifactId>mem4j</artifactId>
6464
<version>0.1.0</version>
6565
</dependency>
6666
</dependencies>
@@ -102,9 +102,9 @@ public class Application {
102102
```java
103103
package com.example;
104104

105-
import com.langmem.memory.Memory;
106-
import com.langmem.memory.MemoryItem;
107-
import com.langmem.memory.Message;
105+
import com.mem4j.memory.Memory;
106+
import com.mem4j.memory.MemoryItem;
107+
import com.mem4j.memory.Message;
108108
import org.springframework.beans.factory.annotation.Autowired;
109109
import org.springframework.stereotype.Service;
110110

@@ -175,7 +175,7 @@ public class ChatController {
175175
server:
176176
port: 8080
177177

178-
langmem:
178+
mem4j:
179179
vector-store:
180180
type: in-memory
181181
options:
@@ -217,7 +217,7 @@ curl -X POST "http://localhost:8080/chat" \
217217
如果你想使用真实的 LLM 服务,修改 `application.yml`
218218

219219
```yaml
220-
langmem:
220+
mem4j:
221221
vector-store:
222222
type: in-memory
223223

@@ -246,4 +246,4 @@ mvn spring-boot:run
246246

247247
---
248248

249-
🎉 恭喜!你已经成功集成了 Lang Memory
249+
🎉 恭喜!你已经成功集成了 Mem4j

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Java Mem0
1+
# Mem4j
22

33
<p align="center">
4-
<img src="docs/images/banner-sm.png" width="800px" alt="Java Mem0 - The Memory Layer for Personalized AI">
4+
<img src="docs/images/banner-sm.png" width="800px" alt="Mem4j - The Memory Layer for Personalized AI">
55
</p>
66

77
<p align="center">
@@ -10,7 +10,7 @@
1010

1111
## Introduction
1212

13-
Java Mem0 is a Java implementation of the Mem0 memory system, providing intelligent memory layer capabilities for AI assistants and agents. It enables personalized AI interactions by remembering user preferences, adapting to individual needs, and continuously learning over time.
13+
Mem4j is a Java implementation of the Mem0 memory system, providing intelligent memory layer capabilities for AI assistants and agents. It enables personalized AI interactions by remembering user preferences, adapting to individual needs, and continuously learning over time.
1414

1515
### Key Features
1616

@@ -34,8 +34,8 @@ Java Mem0 is a Java implementation of the Mem0 memory system, providing intellig
3434
1. Clone the repository:
3535

3636
```bash
37-
git clone https://github.com/LangMem/lang-memory.git
38-
cd lang-memory
37+
git clone https://github.com/Mem4j/mem4j.git
38+
cd mem4j
3939
```
4040

4141
2. Build the project:
@@ -53,9 +53,9 @@ mvn spring-boot:run
5353
### Basic Usage
5454

5555
```java
56-
import com.langmem.memory.Memory;
57-
import com.langmem.memory.MemoryItem;
58-
import com.langmem.memory.Message;
56+
import com.mem4j.memory.Memory;
57+
import com.mem4j.memory.MemoryItem;
58+
import com.mem4j.memory.Message;
5959
import org.springframework.beans.factory.annotation.Autowired;
6060
import org.springframework.stereotype.Service;
6161

@@ -85,7 +85,7 @@ public class MyService {
8585
### Core Components
8686

8787
```
88-
src/main/java/com/langmem/
88+
src/main/java/com/mem4j/
8989
├── memory/ # Core memory management
9090
├── vectorstores/ # Vector database integrations
9191
├── llms/ # LLM provider integrations
@@ -127,7 +127,7 @@ src/main/java/com/langmem/
127127

128128
```yaml
129129
# Memory Configuration
130-
langmem:
130+
mem4j:
131131
vector-store:
132132
type: qdrant
133133
url: http://localhost:6333
@@ -300,8 +300,8 @@ public class AIAssistant {
300300

301301
```bash
302302
# Clone repository
303-
git clone https://github.com/LangMem/lang-memory.git
304-
cd lang-memory
303+
git clone https://github.com/Mem4j/mem4j.git
304+
cd mem4j
305305

306306
# Configure environment
307307
export DASHSCOPE_API_KEY="your-dashscope-api-key"
@@ -340,7 +340,7 @@ mvn jacoco:prepare-agent test jacoco:report
340340

341341
## DashScope Integration
342342

343-
Java Mem0 now supports **DashScope** (通义千问) as a primary LLM and embedding provider, offering excellent Chinese language support and optimized performance for the Asia-Pacific region.
343+
Mem4j now supports **DashScope** (通义千问) as a primary LLM and embedding provider, offering excellent Chinese language support and optimized performance for the Asia-Pacific region.
344344

345345
### Quick Setup
346346

@@ -357,7 +357,7 @@ Java Mem0 now supports **DashScope** (通义千问) as a primary LLM and embeddi
357357

358358
3. **Update Configuration**:
359359
```yaml
360-
langmem:
360+
mem4j:
361361
llm:
362362
type: dashscope
363363
api-key: ${DASHSCOPE_API_KEY}

docker-compose.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# limitations under the License.
1414

1515
services:
16-
# Lang Memory Application
17-
lang-memory:
16+
# Mem4j Application
17+
mem4j:
1818
build: .
1919
ports:
2020
- "8080:8080"
@@ -29,21 +29,21 @@ services:
2929
volumes:
3030
- ./logs:/app/logs
3131
networks:
32-
- langmem-network
32+
- mem4j-network
3333

3434
# PostgreSQL Database
3535
postgres:
3636
image: postgres:15-alpine
3737
ports:
3838
- "5432:5432"
3939
environment:
40-
- POSTGRES_DB=langmem
41-
- POSTGRES_USER=langmem
42-
- POSTGRES_PASSWORD=langmem_password
40+
- POSTGRES_DB=mem4j
41+
- POSTGRES_USER=mem4j
42+
- POSTGRES_PASSWORD=mem4j_password
4343
volumes:
4444
- postgres_data:/var/lib/postgresql/data
4545
networks:
46-
- langmem-network
46+
- mem4j-network
4747

4848
# Qdrant Vector Database
4949
qdrant:
@@ -57,7 +57,7 @@ services:
5757
- QDRANT__SERVICE__HTTP_PORT=6333
5858
- QDRANT__SERVICE__GRPC_PORT=6334
5959
networks:
60-
- langmem-network
60+
- mem4j-network
6161

6262
# Neo4j Graph Database
6363
neo4j:
@@ -75,7 +75,7 @@ services:
7575
- neo4j_import:/var/lib/neo4j/import
7676
- neo4j_plugins:/plugins
7777
networks:
78-
- langmem-network
78+
- mem4j-network
7979

8080
# Elasticsearch (Optional)
8181
elasticsearch:
@@ -89,7 +89,7 @@ services:
8989
volumes:
9090
- elasticsearch_data:/usr/share/elasticsearch/data
9191
networks:
92-
- langmem-network
92+
- mem4j-network
9393

9494
# Weaviate (Optional)
9595
weaviate:
@@ -106,7 +106,7 @@ services:
106106
volumes:
107107
- weaviate_data:/var/lib/weaviate
108108
networks:
109-
- langmem-network
109+
- mem4j-network
110110

111111
volumes:
112112
postgres_data:
@@ -119,5 +119,5 @@ volumes:
119119
weaviate_data:
120120

121121
networks:
122-
langmem-network:
122+
mem4j-network:
123123
driver: bridge

docs/API.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Java Mem0 API Documentation
1+
# Mem4j API Documentation
22

33
## Overview
44

5-
Java Mem0 provides a REST API for managing AI memory operations. The API is built on Spring Boot and provides endpoints for adding, searching, updating, and deleting memories.
5+
Mem4j provides a REST API for managing AI memory operations. The API is built on Spring Boot and provides endpoints for adding, searching, updating, and deleting memories.
66

77
## Base URL
88

@@ -360,7 +360,7 @@ The application exposes health check endpoints:
360360
The API behavior can be configured through application properties:
361361
362362
```yaml
363-
langmem:
363+
mem4j:
364364
vector-store:
365365
type: in-memory
366366
similarity-threshold: 0.7

env.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lang Memory Environment Configuration
1+
# Mem4j Environment Configuration
22
# Copy this file to .env and fill in your actual values
33

44
# =============================================================================
@@ -18,8 +18,8 @@ OPENAI_API_KEY=your-openai-api-key
1818
# =============================================================================
1919

2020
# PostgreSQL Database
21-
POSTGRES_DB=langmem
22-
POSTGRES_USER=langmem
21+
POSTGRES_DB=mem4j
22+
POSTGRES_USER=mem4j
2323
POSTGRES_PASSWORD=your-secure-password
2424

2525
# Neo4j Graph Database
@@ -51,7 +51,7 @@ JAVA_OPTS=-Xmx1g -Xms512m
5151

5252
# Log Level (INFO, DEBUG, WARN, ERROR)
5353
# LOGGING_LEVEL_ROOT=INFO
54-
# LOGGING_LEVEL_LANGMEM=DEBUG
54+
# LOGGING_LEVEL_MEM4J=DEBUG
5555

5656
# =============================================================================
5757
# Security (Production)

example-usage/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<modelVersion>4.0.0</modelVersion>
77

88
<groupId>com.example</groupId>
9-
<artifactId>lang-memory-usage-example</artifactId>
9+
<artifactId>mem4j-usage-example</artifactId>
1010
<version>1.0.0</version>
1111
<packaging>jar</packaging>
1212

13-
<name>Lang Memory Usage Example</name>
14-
<description>Example project showing how to use Lang Memory</description>
13+
<name>Mem4j Usage Example</name>
14+
<description>Example project showing how to use Mem4j</description>
1515

1616
<properties>
1717
<maven.compiler.source>17</maven.compiler.source>
@@ -28,10 +28,10 @@
2828
<version>${spring.boot.version}</version>
2929
</dependency>
3030

31-
<!-- Lang Memory Library -->
31+
<!-- Mem4j Library -->
3232
<dependency>
33-
<groupId>com.langmem</groupId>
34-
<artifactId>lang-memory</artifactId>
33+
<groupId>com.mem4j</groupId>
34+
<artifactId>mem4j</artifactId>
3535
<version>0.1.0</version>
3636
</dependency>
3737
</dependencies>

example-usage/src/main/java/com/example/ChatController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
package com.example;
1818

19-
import com.langmem.memory.Memory;
20-
import com.langmem.memory.MemoryItem;
21-
import com.langmem.memory.Message;
19+
import com.mem4j.memory.Memory;
20+
import com.mem4j.memory.MemoryItem;
21+
import com.mem4j.memory.Message;
2222
import org.springframework.beans.factory.annotation.Autowired;
2323
import org.springframework.web.bind.annotation.*;
2424

0 commit comments

Comments
 (0)