提取操作使用千问plus大模型
This commit is contained in:
25
README.md
25
README.md
@@ -1,5 +1,7 @@
|
||||
# label_ai_service
|
||||
|
||||
> 2026-04-16 update: 默认 LLM 适配器已切换为阿里云百炼/千问(DashScope OpenAI-compatible API)。文本默认模型为 `qwen3.6-plus`,视觉默认模型为 `qwen-vl-plus`;旧的 `ZhipuAIClient` 代码保留在仓库中,但默认依赖注入不再使用。
|
||||
|
||||
`label_ai_service` 是知识图谱智能标注平台的 AI 计算服务,基于 FastAPI 提供独立部署的推理与预处理能力。它不直接访问数据库,而是通过 ZhipuAI GLM 系列模型完成结构化抽取,通过 RustFS 读写原始文件和处理结果,并通过 HTTP 回调把异步视频任务结果通知上游后端。
|
||||
|
||||
当前服务覆盖 6 类核心能力:
|
||||
@@ -128,9 +130,14 @@ label_ai_service/
|
||||
|
||||
```yaml
|
||||
server:
|
||||
port: 8000
|
||||
port: 18000
|
||||
log_level: INFO
|
||||
|
||||
dashscope:
|
||||
api_key: ""
|
||||
base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1"
|
||||
fine_tune_base_url: "https://dashscope.aliyuncs.com/api/v1"
|
||||
|
||||
storage:
|
||||
buckets:
|
||||
source_data: "source-data"
|
||||
@@ -140,12 +147,12 @@ backend: {}
|
||||
|
||||
video:
|
||||
frame_sample_count: 8
|
||||
max_file_size_mb: 200
|
||||
max_file_size_mb: 500
|
||||
keyframe_diff_threshold: 30.0
|
||||
|
||||
models:
|
||||
default_text: "glm-4-flash"
|
||||
default_vision: "glm-4v-flash"
|
||||
default_text: "qwen3.6-plus"
|
||||
default_vision: "qwen-vl-plus"
|
||||
```
|
||||
|
||||
### .env
|
||||
@@ -154,7 +161,9 @@ models:
|
||||
|
||||
| 变量名 | 必填 | 说明 |
|
||||
|---|---|---|
|
||||
| `ZHIPUAI_API_KEY` | 是 | ZhipuAI API Key |
|
||||
| `DASHSCOPE_API_KEY` | 是 | DashScope API Key |
|
||||
| `DASHSCOPE_BASE_URL` | 否 | DashScope OpenAI-compatible base URL |
|
||||
| `DASHSCOPE_FINE_TUNE_BASE_URL` | 否 | DashScope fine-tune API base URL |
|
||||
| `STORAGE_ACCESS_KEY` | 是 | RustFS/S3 Access Key |
|
||||
| `STORAGE_SECRET_KEY` | 是 | RustFS/S3 Secret Key |
|
||||
| `STORAGE_ENDPOINT` | 是 | RustFS/S3 Endpoint,例如 `http://rustfs:9000` |
|
||||
@@ -165,7 +174,9 @@ models:
|
||||
`.env` 示例:
|
||||
|
||||
```ini
|
||||
ZHIPUAI_API_KEY=your-zhipuai-api-key-here
|
||||
DASHSCOPE_API_KEY=your-dashscope-api-key-here
|
||||
DASHSCOPE_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
|
||||
DASHSCOPE_FINE_TUNE_BASE_URL=https://dashscope.aliyuncs.com/api/v1
|
||||
STORAGE_ACCESS_KEY=your-storage-access-key
|
||||
STORAGE_SECRET_KEY=your-storage-secret-key
|
||||
STORAGE_ENDPOINT=http://rustfs:9000
|
||||
@@ -318,7 +329,7 @@ curl -X POST http://localhost:8000/api/v1/finetune/start \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"jsonl_url": "https://example.com/train.jsonl",
|
||||
"base_model": "glm-4-flash",
|
||||
"base_model": "qwen3-14b",
|
||||
"hyperparams": {
|
||||
"epochs": 3,
|
||||
"learning_rate": 0.0001
|
||||
|
||||
Reference in New Issue
Block a user