xinli/项目介绍/环境配置/大模型环境
2026-01-30 16:23:00 +08:00

74 lines
1.5 KiB
Plaintext

# 大模型环境配置说明
## 服务器环境
- **Python**: 3.8.6 (Windows)
- **Ollama 模型**:
- `nomic-embed-text:latest` (274 MB) - 向量嵌入
- `deepseek-r1:32b` (19 GB) - 文本生成
## 配置方案
### 本地开发环境
| 用途 | 模型 | 来源 |
|------|------|------|
| 向量嵌入 | `nomic-embed-text` | 本地 Ollama |
| 文本生成 | `moonshot-v1-32k` | Kimi API (远程) |
### 服务器部署环境
| 用途 | 模型 | 来源 |
|------|------|------|
| 向量嵌入 | `nomic-embed-text` | 本地 Ollama |
| 文本生成 | `deepseek-r1:32b` | 本地 Ollama |
## 配置文件
### Python RAG 服务 (rag-python/config.py)
本地和服务器配置相同:
```python
OLLAMA_URL = "http://localhost:11434"
OLLAMA_EMBED_MODEL = "nomic-embed-text"
```
### Java 后端 (application.yml)
**本地开发** - 使用 Kimi API:
```yaml
rag:
mode: disabled
python:
url: http://localhost:5000
enabled: true
openai:
base-url: https://api.moonshot.cn/v1
api-key: sk-xxx
generate-model: moonshot-v1-32k
```
**服务器部署** - 使用本地 Ollama:
```yaml
rag:
mode: disabled
python:
url: http://localhost:5000
enabled: true
ollama:
url: http://localhost:11434
generate-model: deepseek-r1:32b
enabled: true
```
## 启动顺序
1. `ollama serve` - 启动 Ollama 服务
2. `rag-python/start.bat` - 启动 Python RAG 服务
3. `java -jar xinli-admin.jar` - 启动 Java 后端
## 服务端口
| 服务 | 端口 |
|------|------|
| Ollama | 11434 |
| Python RAG | 5000 |
| Java 后端 | 30081 |