springAiDemo/src/main/resources/application.yaml
kennethcheng 80eb5eb590 feat: 新增流式 RAG 问答与 PDF 上传功能
新增接口:
- POST /api/chat/stream - 流式 RAG 问答 (SSE)
- POST /api/documents/upload - PDF 文件上传
- POST /api/documents/upload/stream - 带进度 PDF 上传

新增功能:
- CorsConfig 跨域配置(支持 localhost:8081, 5173)
- FileUploadResponse/FileUploadProgress DTO
- PDF 文本提取与向量化存储
- MD5 文件去重机制

配置更新:
- embedding 模型更新为 BAAI/bge-m3
- multipart max-file-size: 100MB
- ChatRequest topK 默认值 3 → 10
2026-04-20 02:57:36 +08:00

53 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server:
port: 8080
spring:
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
ai:
openai:
api-key: ollama
base-url: http://localhost:11434
chat:
api-key: ollama
base-url: http://localhost:11434
options:
model: gpt-oss:120b-cloud
# model: kimi-k2.5:cloud
# model: gemma4:e2b
# max-tokens: 10000
temperature: 0.7
embedding:
api-key: key
base-url: https://api.siliconflow.cn
options:
model: BAAI/bge-m3
dimensions: 1024
enable: true
vectorstore:
milvus:
client:
host: "192.168.50.103"
port: 19530
databaseName: "doris_docs"
collectionName: "vector_store"
embeddingDimension: 1024
indexType: IVF_FLAT
metricType: COSINE
# 增加这个配置可以让springai帮我们创建vector_store
initialize-schema: true
document:
data-path: data
chunk-size: 400
min-chunk-size: 200
max-num-chunk: 10000
# CORS 配置
cors:
allowed-origins: ${CORS_ORIGINS:http://localhost:8081,http://localhost:5173}
allowed-methods: GET,POST,PUT,DELETE,OPTIONS
allowed-headers: "*"
allow-credentials: true