Files
customer-server/config.yml

151 lines
6.1 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:
address: ":3000"
name: "customer-server"
workerId: 1
cache:
localTTL: 60
redisTTL: 300
# Database.
database:
default:
- type: "pgsql"
host: "localhost"
port: "5432"
user: "postgres"
pass: "123456"
name: "customer_server"
prefix: "customer_server_" # (可选)表名前缀
role: "master" # (可选)数据库主从角色(master/slave)默认为master。如果不使用应用主从机制请不配置或留空即可。
debug: false # (可选)开启调试模式
dryRun: false # (可选)ORM空跑(只读不写)
charset: "utf8" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312)一般设置为utf8mb4。默认为utf8。
timezone: "Asia/Shanghai" # (可选)时区配置,例如:Local
maxIdle: 5 # (可选)连接池最大闲置的连接数(默认10)
maxOpen: 20 # (可选)连接池最大打开的连接数(默认无限制)
maxLifetime: "30s" # (可选)连接对象可重复使用的时间长度(默认30秒)
maxIdleConnTime: "30s" # (可选v2.10新增)连接池中空闲连接的最大生存时间(默认30秒)。可以通过配置文件或SetConnMaxIdleTime方法设置避免长时间空闲连接占用资源。
createdAt: "created_at" # (可选)自动创建时间字段名称
updatedAt: "updated_at" # (可选)自动更新时间字段名称
deletedAt: "deleted_at" # (可选)软删除时间字段名称
timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性为true时CreatedAt/UpdatedAt/DeletedAt都将失效
- type: "pgsql"
host: "localhost"
port: "5432"
user: "postgres"
pass: "123456"
name: "customer_server"
prefix: "customer_server_" # (可选)表名前缀
role: "slave" # (可选)数据库主从角色(master/slave)默认为master。如果不使用应用主从机制请不配置或留空即可。
debug: false # (可选)开启调试模式
dryRun: false # (可选)ORM空跑(只读不写)
charset: "utf8" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312)一般设置为utf8mb4。默认为utf8。
timezone: "Asia/Shanghai" # (可选)时区配置,例如:Local
maxIdle: 5 # (可选)连接池最大闲置的连接数(默认10)
maxOpen: 20 # (可选)连接池最大打开的连接数(默认无限制)
maxLifetime: "30s" # (可选)连接对象可重复使用的时间长度(默认30秒)
maxIdleConnTime: "30s" # (可选v2.10新增)连接池中空闲连接的最大生存时间(默认30秒)。可以通过配置文件或SetConnMaxIdleTime方法设置避免长时间空闲连接占用资源。
createdAt: "created_at" # (可选)自动创建时间字段名称
updatedAt: "updated_at" # (可选)自动更新时间字段名称
deletedAt: "deleted_at" # (可选)软删除时间字段名称
timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性为true时CreatedAt/UpdatedAt/DeletedAt都将失效
jwt:
secret: "abcdefghijklmnopqrstuvwxyz"
rate:
limit: 200
burst: 300
# --- 华为云服务器116.204.74.41:17027带认证 ---
#mongo:
# default:
# address: "mongodb://root:M0ng0DB%40Pass2026%21@116.204.74.41:17027?authSource=admin"
# database: "customer_service"
# logger:
# level: "all"
# stdout: true
# --- 内网服务器192.168.3.200:27017无认证 ---
mongo:
default:
address: "localhost:27017/?directConnection=true"
database: "customer_service"
logger:
level: "all"
stdout: true
redis:
default:
address: localhost:6379
db: 0
idleTimeout: "60s"
maxConnLifetime: "90s"
waitTimeout: "60s"
dialTimeout: "30s"
readTimeout: "30s"
writeTimeout: "30s"
maxActive: 100
consul:
address: localhost:8500
rabbitmq:
host: localhost
port: 5672
username: admin
password: 123456
# 响应队列配置从message迁移
responseExchange: "ragflow.response"
responseQueue: "ragflow.response.queue"
responseRoutingKey: "#" # 匹配所有routing key
# 不配置instanceName直接使用os.Hostname()获取容器名/主机名作为实例ID
jaeger:
addr: localhost:4318
# RAGFlow配置customerservice只需要base_url和api_key用于更新prompt接口
ragflow:
base_url: "http://116.204.74.41"
api_key: "ragflow-tg4BrmCIDXbZDB80JGyq1cDNFyr2_kfAEd053YuDV58"
default_model: "qwen3-235b-a22b-instruct-2507" # 默认LLM模型可通过Consul动态覆盖
embedding_model: "text-embedding-v4@Tongyi-Qianwen" # embedding模型创建知识库时使用格式model@factory
followUp:
enable: true
queue: "followup.queue"
exchange: "followup.delayed"
routingKey: "followup"
delays: [30, 60, 180] # 三次追问延时第一次30s第二次60s第三次180s
contents:
- "还有其他问题吗?"
- "如果需要帮助,随时告诉我~"
- "我一直在线,有问题随时找我~"
archive:
enable: true
queue: "archive.queue"
exchange: "archive.delayed"
routingKey: "archive"
delay: 3600 # 归档延时默认1小时
# 月度归档配置
enabled: true # 是否启用月度归档
cron: "0 0 0 1 * *" # 每月1号0点执行归档上个月整月数据
mongoBatchSize: 1000 # 从原表复制到临时表的批量大小
esBatchSize: 500 # 从临时表写入 ES 的批量大小
testMode: true # 测试模式true=归档最近7天false=归档上个月生产环境设为false
# 卡片触发配置
card:
triggerCount: 5 # 触发发送卡片的对话轮数(对话>=此值时触发)
# 历史上下文配置
history:
contextLimit: 5 # 读取历史对话轮数用于新Session上下文注入
# Elasticsearch 配置
elasticsearch:
addresses:
- "http://116.204.74.41:9200"
username: ""
password: ""