新增接口: - 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
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
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 |