From 19db078e7241b01558c1e18a87f775356ea27f19 Mon Sep 17 00:00:00 2001 From: huaqingxu Date: Fri, 6 Mar 2026 23:39:52 +0800 Subject: [PATCH] add --- README.md | 31 +++++++++++++++++++++++++++++-- main.py | 4 ++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ad130d6..c2858b6 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Before running the server, ensure you have: - `GET /docs` - OpenAPI documentation # 验证 -测试 ollama +## 测试 ollama curl http://localhost:11434/api/embeddings \ -d '{ @@ -113,5 +113,32 @@ curl http://localhost:11434/api/embeddings \ "prompt":"hello world" }' -测试 mem0 +## 测试 mem0 +健康检查: +curl http://localhost:8000/health + +返回: + +{"status":"ok"} + +创建记忆: + +curl -X POST http://localhost:8000/v2/memories \ +-H "Content-Type: application/json" \ +-d '{ +"user_id":"test", +"text":"测试用例创建" +}' + +搜索记忆: + +curl -X POST http://localhost:8000/v2/memories/search \ +-H "Content-Type: application/json" \ +-d '{ +"user_id":"test", +"query":"测试" +}' + + +## 测试 neo4j diff --git a/main.py b/main.py index 999a67b..adb51b2 100644 --- a/main.py +++ b/main.py @@ -45,7 +45,7 @@ DEFAULT_CONFIG = { "llm": { "provider": "ollama", "config": { - "host": OLLAMA_HOST, + # "host": OLLAMA_HOST, "model": OLLAMA_LLM_MODEL, "temperature": 0.2, }, @@ -53,7 +53,7 @@ DEFAULT_CONFIG = { "embedder": { "provider": "ollama", "config": { - "host": OLLAMA_HOST, + # "host": OLLAMA_HOST, "model": OLLAMA_EMBEDDER_MODEL, }, },