|
@@ -1,3 +1,44 @@
|
|
|
-# llm_vector_server
|
|
|
+# rag_server
|
|
|
+ rag 知识库服务, 基于 Quart + asyncio 搭建的异步知识库分块索引服务
|
|
|
+ 其中,文本 embedding 服务使用的 Qwen3-embedding-4B模型,向量维度 2560;
|
|
|
+ 搜索策略流程为: ES -> milvus -> Mysql -> Result;
|
|
|
+
|
|
|
+ todo:
|
|
|
+ 1. 在 milvus -> mysql之间增加精排模块,优先级较低暂未推进
|
|
|
+ 2. 目前的图片 embedding 模块使用的eva-clip模型,图片 和 文本使用不同向量模式,待优化
|
|
|
+
|
|
|
|
|
|
-大模型向量服务
|
|
|
+### 启动
|
|
|
+#### 1. 本地启动
|
|
|
+ git clone https://git.yishihui.com/Server/rag_server.git
|
|
|
+ hypercorn vector_app:app --config config.toml
|
|
|
+
|
|
|
+#### 2. docker启动
|
|
|
+ docker compose up -d --force-recreate --build
|
|
|
+
|
|
|
+### feature 管理
|
|
|
+ 1. master 分支禁止直接commit
|
|
|
+ 2. 分支命名规则: feature/name/YYYY-mm-dd-description
|
|
|
+ 比如: feature/luojunhui/2025-09-23-update-readme
|
|
|
+ 3. commit 前使用 “ruff format .” 格式化项目代码
|
|
|
+
|
|
|
+### 部署相关
|
|
|
+ 服务器:因为GPU资源问题,服务部署在本地机房 4090机器上
|
|
|
+ 服务器 ip: 192.168.100.31
|
|
|
+ 服务器 user: ubuntu; password: denet
|
|
|
+ 服务地址:/home/ubuntu/luojunhui/llm/rag_server
|
|
|
+
|
|
|
+### 项目结构
|
|
|
+ applications
|
|
|
+ api: api 调用模块,入 embedding server 以及三方 deepseek api
|
|
|
+ async_task: 服务异步任务处理模块
|
|
|
+ config: 配置
|
|
|
+ resource: 服务数据库资源管理
|
|
|
+ search: 搜索策略
|
|
|
+ utils: 功能组件
|
|
|
+ routes: 服务路由
|
|
|
+ vector_app.py: main app
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|