Skip to content

Commit 760dd47

Browse files
committed
feat: update readme
1 parent 1ce1a57 commit 760dd47

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

README.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -236,32 +236,37 @@ pip install -r ./docker/requirements.txt
236236
uvicorn memos.api.server_api:app --host 0.0.0.0 --port 8001 --workers 2
237237
```
238238

239-
For detailed integration steps, see the [`API Reference`](https://docs-pre.openmem.net/cn/open_source/getting_started/rest_api_server/#fork-memos-%E4%BB%93%E5%BA%93%E4%BB%A3%E7%A0%81httpsgithubcommemtensormemos-%E5%88%B0%E8%87%AA%E5%B7%B1%E7%9A%84%E4%BB%93%E5%BA%93).
239+
For detailed integration steps, see the [`API Reference`](https://docs.openmem.net/open_source/getting_started/rest_api_server/#run-locally).
240+
241+
#### If you prefer to deploy using Docker, please refer to the [`Docker Reference`](https://docs.openmem.net/open_source/getting_started/rest_api_server/#method-1-docker-use-repository-dependency-package-imagestart-recommended-use).
242+
240243

241244
Example
242-
- Add User Memory http://localhost:8000/product/add (POST)
243-
```json
244-
// Request params
245-
{
246-
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
247-
"mem_cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca",
248-
"messages": [
249-
{
250-
"role": "user",
251-
"content": "I like strawberry"
252-
}
253-
],
254-
"async_mode": "sync"
255-
}
245+
- Add User Message
246+
```bash
247+
curl -X POST http://localhost:8000/product/add \
248+
-H "Content-Type: application/json" \
249+
-d '{
250+
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
251+
"mem_cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca",
252+
"messages": [
253+
{
254+
"role": "user",
255+
"content": "I like strawberry"
256+
}
257+
],
258+
"async_mode": "sync"
259+
}'
256260
```
257-
- Query User Memory http://localhost:8000/product/search (POST)
258-
```json
259-
// Request params
260-
{
261-
"query": "What do I like",
262-
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
263-
"mem_cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca"
264-
}
261+
- Search User Memory
262+
```bash
263+
curl -X POST http://localhost:8000/product/search \
264+
-H "Content-Type: application/json" \
265+
-d '{
266+
"query": "What do I like",
267+
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
268+
"mem_cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca"
269+
}'
265270
```
266271

267272
## 💬 Community & Support

0 commit comments

Comments
 (0)