- 移除原有的手机号识别与消息发送逻辑 - 删除RabbitMQ和邮件相关配置及代码 - 引入PDF、HTML、JSON等多种文档读取器 - 集成向量存储与检索功能支持问答 - 更新Spring AI依赖并调整内存存储方式 - 添加新的工具类用于保存文档到向量库- 修改提示词模板去除强制附加句规则 - 调整Cassandra和PgVector相关配置项- 新增多种文件格式读取组件实现类
86 lines
2.6 KiB
YAML
86 lines
2.6 KiB
YAML
#file: noinspection SpringBootConfigYamlInspection
|
||
server:
|
||
servlet:
|
||
encoding:
|
||
charset: utf-8
|
||
force: true
|
||
spring:
|
||
application:
|
||
name: snails-ai
|
||
banner:
|
||
location: config/banner.txt
|
||
cassandra:
|
||
contact-points: 127.0.0.1 # Cassandra 集群节点地址(可配置多个,用逗号分隔)
|
||
port: 9042 # 端口号
|
||
local-datacenter: datacenter1 # 必须与集群配置的数据中心名称一致(大小写敏感)
|
||
jackson:
|
||
serialization:
|
||
write-dates-as-timestamps: false
|
||
data:
|
||
redis:
|
||
host: localhost
|
||
port: 6379
|
||
password: redis
|
||
database: 4
|
||
lettuce:
|
||
pool:
|
||
enabled: true
|
||
max-active: 20
|
||
max-idle: 10
|
||
max-wait: 10000
|
||
min-idle: 10
|
||
time-between-eviction-runs: 10000
|
||
datasource:
|
||
driver-class-name: org.postgresql.Driver
|
||
url: jdbc:postgresql://localhost:5432/postgres?serverTimezone=Asia/Shanghai
|
||
username: postgres
|
||
password: postgressql
|
||
# HikariCP 连接池配置
|
||
hikari:
|
||
maximum-pool-size: 20 # 最大连接数设置为 20
|
||
minimum-idle: 20 # 保持 20 个空闲连接(与最大连接数一致)
|
||
connection-timeout: 5000 # 获取连接超时 5 秒
|
||
max-lifetime: 28800000 # 8 小时(确保在数据库连接超时前被回收)
|
||
ai:
|
||
vectorstore:
|
||
pgvector:
|
||
initialize-schema: true
|
||
table-name: snails_ai_vector
|
||
index-type: hnsw
|
||
dimensions: 1024
|
||
chat:
|
||
memory:
|
||
repository:
|
||
cassandra:
|
||
keyspace: snails_ai
|
||
table: t_ai_chat_memory # 表名
|
||
time-to-live: 1095d # 数据的自动过期时间(1095天 ≈ 3年)
|
||
initialize-schema: true # 自动初始化表结构
|
||
dashscope:
|
||
api-key: ENC(cMgcKZkFllyE88DIbGwLKot9Vg02co+gsmY8L8o4/o3UjhcmqO4lJzFU35Sx0n+qFG8pDL0wBjoWrT8X6BuRw9vNlQhY1LgRWHaF9S1zzyM=)
|
||
chat:
|
||
options:
|
||
model: qwen-plus
|
||
temperature: 0.5
|
||
embedding:
|
||
options:
|
||
model: text-embedding-v4
|
||
dimensions: 1024
|
||
read-timeout: 60000
|
||
mybatis-plus:
|
||
configuration:
|
||
map-underscore-to-camel-case: true
|
||
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||
global-config:
|
||
banner: false
|
||
mapper-locations: classpath*:/mapperxml/*.xml
|
||
logging:
|
||
level:
|
||
# 隐藏掉 Hibernate 冗长的连接池 INFO 信息
|
||
org.hibernate.orm.connections.pooling: WARN
|
||
org.springframework.ai.chat.client.advisor: DEBUG
|
||
jasypt:
|
||
encryptor:
|
||
password: ${jasypt.encryptor.password}
|
||
algorithm: PBEWithHMACSHA512AndAES_256
|
||
iv-generator-classname: org.jasypt.iv.RandomIvGenerator |