service 修改 Redis 存储 KV
This commit is contained in:
@@ -32,19 +32,10 @@ chat:
|
||||
bot_desc: "你是一个AI助手,我需要你模拟一名资深的软件工程师来回答我的问题"
|
||||
# 单次请求,保留的响应tokens数量
|
||||
min_response_tokens: 2048
|
||||
# 上下文缓存时长,单位s
|
||||
context_ttl: 1800
|
||||
# 上下文消息条数
|
||||
context_len: 4
|
||||
redis:
|
||||
host: "127.0.0.1"
|
||||
port: 8888
|
||||
pwd: "123456"
|
||||
mysql:
|
||||
dsn: "root:root@tcp(127.0.0.1:3306)/ai_chat?collation=utf8mb4_unicode_ci&charset=utf8mb4"
|
||||
maxLifeTime: 3600
|
||||
maxOpenConn: 10
|
||||
maxIdleConn: 10
|
||||
dependOn:
|
||||
sensitive:
|
||||
address: "localhost:50053"
|
||||
@@ -54,49 +45,16 @@ dependOn:
|
||||
accessToken: "ang1chubdev1ozhome256487d22sapguuv1ozhom"
|
||||
tokenizer:
|
||||
address: "http://127.0.0.1:3002"
|
||||
vector:
|
||||
# 向量后端:tencent / pgvector
|
||||
provider: "pgvector"
|
||||
# 历史问答命中阈值
|
||||
threshold: 0.99
|
||||
tencent:
|
||||
url: "http://lb-4u4r1fk4-1ys6gv3rpmdan420.clb.ap-guangzhou.tencentclb.com:60000"
|
||||
username: "root"
|
||||
pwd: "YaUfVueWZJ20e4ghyLlBT8Dou5OapwpFTUq50oft"
|
||||
database: "ai-chat"
|
||||
timeout: 5
|
||||
maxIdleConnPerHost: 2
|
||||
readConsistency: "eventualConsistency"
|
||||
idleConnTimeout: 60
|
||||
pgvector:
|
||||
dsn: "postgres://postgres:postgres@127.0.0.1:15432/ai_chat?sslmode=disable"
|
||||
table: "chat_record_vectors"
|
||||
dimensions: 1024
|
||||
maxLifeTime: 3600
|
||||
maxOpenConn: 10
|
||||
maxIdleConn: 10
|
||||
embedding:
|
||||
provider: "openai-compatible"
|
||||
# 智谱 OpenAI 兼容网关;可被项目根目录 .env 覆盖
|
||||
base_url: "https://open.bigmodel.cn/api/paas/v4"
|
||||
# 默认故意设成错误值,真实 key 请放到项目根目录 .env
|
||||
api_key: "__INVALID_SET_AI_CHAT_EMBEDDING_API_KEY__"
|
||||
# embedding-2 固定 1024 维,和当前 pgvector 表结构一致
|
||||
model: "embedding-2"
|
||||
timeout: 10
|
||||
vectorDB:
|
||||
# 访问地址
|
||||
url: "http://lb-4u4r1fk4-1ys6gv3rpmdan420.clb.ap-guangzhou.tencentclb.com:60000"
|
||||
# 用户名
|
||||
username: "root"
|
||||
# 密码
|
||||
pwd: "YaUfVueWZJ20e4ghyLlBT8Dou5OapwpFTUq50oft"
|
||||
database: "ai-chat"
|
||||
# 请求超时时长s
|
||||
timeout: 5
|
||||
# 最大空闲连接数
|
||||
maxIdleConnPerHost: 2
|
||||
# 读一致性: strongConsistency(强一致性),eventualConsistency(最终一致性)
|
||||
readConsistency: "eventualConsistency"
|
||||
# 空闲连接超时时长s
|
||||
idleConnTimeout: 60
|
||||
faiss:
|
||||
base_url: "http://127.0.0.1:8451"
|
||||
search_k: 1
|
||||
similarity_threshold: 0.9
|
||||
timeout: 10
|
||||
|
||||
Reference in New Issue
Block a user