examples/opengauss-embedding
SeasonMay 13a7967eef 开源之夏2025-openGauss向量数据库对接Embedding模型最佳实践 2025-09-30 15:04:39 +08:00
..
docker 开源之夏2025-openGauss向量数据库对接Embedding模型最佳实践 2025-09-30 15:04:39 +08:00
frontend 开源之夏2025-openGauss向量数据库对接Embedding模型最佳实践 2025-09-30 15:04:39 +08:00
rag 开源之夏2025-openGauss向量数据库对接Embedding模型最佳实践 2025-09-30 15:04:39 +08:00
scripts 开源之夏2025-openGauss向量数据库对接Embedding模型最佳实践 2025-09-30 15:04:39 +08:00
.env.example 开源之夏2025-openGauss向量数据库对接Embedding模型最佳实践 2025-09-30 15:04:39 +08:00
README.md 开源之夏2025-openGauss向量数据库对接Embedding模型最佳实践 2025-09-30 15:04:39 +08:00
requirements.txt 开源之夏2025-openGauss向量数据库对接Embedding模型最佳实践 2025-09-30 15:04:39 +08:00

README.md

openGauss RAG (DataVec) — MVP

快速开始 Quick Start

1. 启动依赖

cd docker
docker compose up -d

初次(可选):进入 ollama 容器拉取模型:qwen2:7bnomic-embed-text 等。

docker exec -it ollama bash
ollama pull qwen2:7b

2. 安装依赖 + 配置

pip install -r requirements.txt
cp .env.example .env
# 按需编辑 .env

3. 初始化数据库

python scripts/init_db.py

4. 启动后端

uvicorn rag.service:app --reload --port 8000

5. 启动前端

streamlit run frontend/app.py

6. 快速导入示例 FAQ

python scripts/quick_ingest_md.py

目录

  • rag/配置、数据库层、嵌入适配、RAG 流水线与 FastAPI 服务
  • frontend/Streamlit 简易前端
  • docker/docker-compose.yaml 与 BentoML 嵌入服务
  • scripts/:初始化与示例导入脚本

说明

  • 嵌入后端在 .env 切换:EMBED_BACKEND=hf|cohere|bento
  • openGauss 需使用 DataVec 镜像(已在 compose 中指定)
  • 生成端默认使用本地 Ollama可按需改为云端大模型 API