Files
ai-agent/config/config.example.yaml
T

95 lines
3.9 KiB
YAML
Raw Normal View History

language: zh-CN
2026-04-09 10:01:23 +08:00
server:
port: 8083
# Public address of the independently deployed frontend.
frontendUrl: http://127.0.0.1:3000
cors:
# Browser CORS allowlist. In production, replace this with the actual frontend or embedded-site domains, such as https://support.example.com.
# Leave it empty to reject cross-origin browser requests. Same-origin and non-browser calls are still supported.
allowedOrigins:
- http://127.0.0.1:3000
- http://localhost:3000
2026-04-09 10:01:23 +08:00
db:
# PostgreSQL is the only supported business database.
type: postgres
dsn: host=127.0.0.1 user=kefu password=change-me dbname=kefu port=5432 sslmode=disable TimeZone=Asia/Shanghai
# Maximum number of idle connections kept in the pool. Values <= 0 use the database/sql default.
2026-04-09 10:01:23 +08:00
maxIdleConns: 5
# Maximum number of open connections. Values <= 0 mean no explicit limit.
2026-04-09 10:01:23 +08:00
maxOpenConns: 20
# Maximum time an idle connection may stay in the pool, in seconds. Values <= 0 leave it unset.
2026-04-09 10:01:23 +08:00
connMaxIdleTimeSeconds: 300
# Maximum lifetime of a connection, in seconds. Values <= 0 leave it unset.
2026-04-09 10:01:23 +08:00
connMaxLifetimeSeconds: 1800
logger:
level: info
format: text
addSource: false
storage:
# Default file storage provider used for uploads. Supported values: local, oss.
# Empty value is treated as local by the backend.
2026-04-09 10:01:23 +08:00
default: local
# Maximum size of a single uploaded file, in MB. Values <= 0 fall back to the backend default.
2026-04-09 10:01:23 +08:00
maxUploadSizeMB: 20
local:
# Files are written under this directory, relative to the process working directory unless an absolute path is used.
2026-04-09 10:01:23 +08:00
root: data/storage
# Public URL prefix used when returning local file URLs. The server must expose this path as static files.
# Example: storage key "images/a.png" becomes "/storage/images/a.png".
baseUrl: http://127.0.0.1:8083/storage
2026-04-09 10:01:23 +08:00
oss:
# Aliyun OSS endpoint. Both "oss-cn-hangzhou.aliyuncs.com" and "https://oss-cn-hangzhou.aliyuncs.com" are accepted.
2026-04-09 10:01:23 +08:00
endpoint: ""
# OSS bucket name.
2026-04-09 10:01:23 +08:00
bucket: ""
# OSS access credentials. Keep the secret out of committed environment-specific config.
2026-04-09 10:01:23 +08:00
accessKeyId: ""
accessKeySecret: ""
# Optional public CDN/custom domain prefix for object URLs, for example https://files.example.com.
# If empty, public buckets use the default bucket endpoint URL; private buckets use signed URLs.
2026-04-09 10:01:23 +08:00
baseUrl: ""
# Set to true for private buckets. Private buckets return temporary signed URLs for reads.
2026-04-09 10:01:23 +08:00
private: false
# Expiration for generated OSS signed GET URLs, in seconds. Values <= 0 fall back to 600.
2026-04-09 10:01:23 +08:00
signedUrlExpireSeconds: 600
vectorDB:
# Local libSQL file used only for RAG embeddings and knowledge text chunks.
path: data/agent/vectors.db
2026-04-09 10:01:23 +08:00
wxWork:
# Whether to enable WeCom features.
# When set to false, the WeCom SDK is not initialized, and customer service callbacks and app notifications are unavailable.
2026-04-09 10:01:23 +08:00
enabled: false
# WeCom corporate ID.
# Example: wwxxxxxxxxxxxxxxxx, from the WeCom admin console.
2026-04-09 10:01:23 +08:00
corpId:
# WeCom app secret.
# Used by the backend to obtain access tokens and user identities. Keep it confidential.
2026-04-09 10:01:23 +08:00
corpSecret: ""
# AgentID of the WeCom custom app, used for app notifications.
2026-04-09 10:01:23 +08:00
agentId:
# Private key for decrypting WeCom callbacks.
2026-04-09 10:01:23 +08:00
rsaPrivateKey: ""
# WeCom callback token.
2026-04-09 10:01:23 +08:00
token: ""
# WeCom message encryption/decryption EncodingAESKey.
2026-04-09 10:01:23 +08:00
encodingAESKey: ""
2026-04-19 18:11:34 +08:00
notify:
# Whether to enable WeCom app message notifications.
2026-04-19 18:11:34 +08:00
enabled: false
# Default list of system user IDs to receive notifications. If the target business user has a bound WeCom identity, that user is preferred.
# System user IDs are mapped to WeCom member IDs through identity bindings before messages are sent.
2026-04-19 18:11:34 +08:00
toUsers: []
# Whether to send confidential messages.
2026-04-19 18:11:34 +08:00
safe: false
# Whether to enable duplicate message checks.
2026-04-19 18:11:34 +08:00
enableDuplicateCheck: true
# Duplicate message check window, in seconds.
2026-04-19 18:11:34 +08:00
duplicateCheckInterval: 1800