146 lines
3.4 KiB
Plaintext
146 lines
3.4 KiB
Plaintext
server:
|
||
port: 8080
|
||
|
||
spring:
|
||
application:
|
||
name: gdyd_zhpb_zgf
|
||
|
||
# PostgreSQL 单数据源配置
|
||
datasource:
|
||
driver-class-name: org.postgresql.Driver
|
||
url: jdbc:postgresql://127.0.0.1:5432/gdyd_zhpb_zgf
|
||
username: postgres
|
||
password: 123456
|
||
|
||
# JPA 配置
|
||
jpa:
|
||
database: postgresql
|
||
hibernate:
|
||
ddl-auto: update
|
||
show-sql: true
|
||
properties:
|
||
hibernate:
|
||
dialect: org.hibernate.dialect.PostgreSQLDialect
|
||
format_sql: true
|
||
jdbc.time_zone: Asia/Shanghai
|
||
|
||
# Redis 配置
|
||
data:
|
||
redis:
|
||
host: 127.0.0.1
|
||
port: 6379
|
||
password:
|
||
database: 0
|
||
timeout: 6000ms
|
||
lettuce:
|
||
pool:
|
||
max-active: 8
|
||
max-wait: -1ms
|
||
max-idle: 8
|
||
min-idle: 0
|
||
|
||
# 文件上传配置
|
||
servlet:
|
||
multipart:
|
||
# 单个文件最大大小 (500MB)
|
||
max-file-size: 500MB
|
||
# 整个请求最大大小 (500MB)
|
||
max-request-size: 500MB
|
||
# 文件写入磁盘的阈值 (10MB,超过此大小会写入临时文件)
|
||
file-size-threshold: 10MB
|
||
# 启用multipart上传
|
||
enabled: true
|
||
|
||
# SSO配置
|
||
sso:
|
||
# ES接口基础地址
|
||
es-base-url: http://es-integration.es-uat-paas:8890
|
||
# 获取用户信息接口路径
|
||
getUserInfoPath: /bi/getUserInfoByTicket
|
||
|
||
# 文件管理配置
|
||
file:
|
||
# 文件上传存储路径
|
||
upload-path: ./uploads
|
||
# ZIP文件解压路径
|
||
extract-path: ./extracts
|
||
# 支持的文件类型
|
||
allowed-types: pdf,doc,docx,txt
|
||
# 是否只返回技术文件类型(PDF、DOC、DOCX、PPT、PPTX、TXT、JSON)
|
||
filter:
|
||
technical-only: true
|
||
|
||
# 向量化服务配置
|
||
vectorize:
|
||
# 向量化接口基础地址
|
||
base-url: http://localhost:8001
|
||
# 向量化接口路径
|
||
api-path: /vectorize
|
||
# 向量维度(从接口返回的dimension字段获取,默认896)
|
||
dimension: 896
|
||
|
||
# 向量化模型阈值配置(按模型区分)
|
||
vector-limits:
|
||
default:
|
||
max-chars: 300
|
||
max-tokens: 512
|
||
text-embedding-ada-002:
|
||
max-chars: 300
|
||
max-tokens: 512
|
||
embed-bge-large-zh-v1.5:
|
||
max-chars: 300
|
||
max-tokens: 512
|
||
|
||
# Swagger/OpenAPI 配置
|
||
springdoc:
|
||
api-docs:
|
||
path: /api-docs
|
||
enabled: true
|
||
swagger-ui:
|
||
path: /swagger-ui.html
|
||
enabled: true
|
||
tags-sorter: alpha
|
||
operations-sorter: alpha
|
||
try-it-out-enabled: true
|
||
display-request-duration: true
|
||
show-actuator: false
|
||
# 排除异常处理器包,避免兼容性问题
|
||
packages-to-exclude: com.zhpb.gdyd_zhpb_zgf.exception
|
||
# 不扫描ControllerAdvice类
|
||
use-management-port: false
|
||
|
||
# Actuator 配置
|
||
management:
|
||
endpoints:
|
||
web:
|
||
exposure:
|
||
include: health,info
|
||
endpoint:
|
||
health:
|
||
show-details: always
|
||
health:
|
||
indicators:
|
||
enabled: true
|
||
|
||
# AI模型配置
|
||
ai:
|
||
model-type: public # public: 公网模型(DeepSeek), private: 私有模型
|
||
|
||
# DeepSeek AI 配置 (公网模型)
|
||
deepseek:
|
||
api-key: sk-62f7d771d03046fa8cf77a4adfb9048f # 建议通过环境变量设置
|
||
api-url: https://api.deepseek.com/v1/chat/completions
|
||
model: deepseek-chat
|
||
temperature: 0.7
|
||
max-tokens: 4096
|
||
|
||
# 私有大模型配置
|
||
private-model:
|
||
url: http://IP:PORT/bigmodel_infer_gateway/v1/service # 私有模型API地址
|
||
appid: "" # 私有模型AppID
|
||
appkey: "" # 私有模型AppKey
|
||
capabilityname: semantic0000000000000000 # 能力名称
|
||
model: JiuTian-75B-8K # 私有模型名称
|
||
temperature: 0.1 # 温度参数
|
||
max-tokens: 1024 # 最大token数
|