frontend 兼容
This commit is contained in:
124
ai-chat-stack/compose.yaml
Normal file
124
ai-chat-stack/compose.yaml
Normal file
@@ -0,0 +1,124 @@
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: ai-chat-mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
command:
|
||||
- --default-authentication-plugin=mysql_native_password
|
||||
volumes:
|
||||
- /data/mysql:/var/lib/mysql
|
||||
- /home/lian/share/aichat/init/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql:ro
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-proot"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
pgvector:
|
||||
image: pgvector/pgvector:pg16
|
||||
container_name: ai-chat-pgvector
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: ai_chat
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- "15432:5432"
|
||||
volumes:
|
||||
- /data/pgvector:/var/lib/postgresql/data
|
||||
- /home/lian/share/aichat/init/pgvector-init.sql:/docker-entrypoint-initdb.d/pgvector-init.sql:ro
|
||||
|
||||
tokenizer:
|
||||
build:
|
||||
context: ../tokenizer
|
||||
image: tokenizer:1.0.0
|
||||
container_name: tokenizer
|
||||
ports:
|
||||
- "3002:3002"
|
||||
restart: unless-stopped
|
||||
|
||||
sensitive-filter:
|
||||
build:
|
||||
context: ../keywords-filter
|
||||
image: keywords-filter:1.0.0
|
||||
container_name: sensitive-filter
|
||||
volumes:
|
||||
- /home/lian/share/aichat/ai-chat-stack/configs/sensitive.yaml:/app/config.yaml:ro
|
||||
- /home/lian/share/aichat/ai-chat-stack/configs/sensitive-dict.txt:/app/dict.txt:ro
|
||||
command:
|
||||
- --config=/app/config.yaml
|
||||
- --dict=/app/dict.txt
|
||||
ports:
|
||||
- "50053:50053"
|
||||
restart: unless-stopped
|
||||
|
||||
keywords-filter:
|
||||
build:
|
||||
context: ../keywords-filter
|
||||
image: keywords-filter:1.0.0
|
||||
container_name: keywords-filter
|
||||
volumes:
|
||||
- /home/lian/share/aichat/ai-chat-stack/configs/keywords.yaml:/app/config.yaml:ro
|
||||
- /home/lian/share/aichat/ai-chat-stack/configs/keywords-dict.txt:/app/dict.txt:ro
|
||||
command:
|
||||
- --config=/app/config.yaml
|
||||
- --dict=/app/dict.txt
|
||||
ports:
|
||||
- "50054:50054"
|
||||
restart: unless-stopped
|
||||
|
||||
ai-chat-service:
|
||||
build:
|
||||
context: ../ai-chat-service
|
||||
image: ai-chat-service:1.0.0
|
||||
container_name: ai-chat-service
|
||||
dns:
|
||||
- 223.5.5.5
|
||||
- 119.29.29.29
|
||||
- 8.8.8.8
|
||||
volumes:
|
||||
- /home/lian/share/aichat/ai-chat-stack/configs/ai-chat-service.yaml:/app/config.yaml:ro
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
ports:
|
||||
- "50055:50055"
|
||||
depends_on:
|
||||
- mysql
|
||||
- tokenizer
|
||||
- sensitive-filter
|
||||
- keywords-filter
|
||||
- pgvector
|
||||
healthcheck:
|
||||
test: ["CMD", "grpc_health_probe", "-addr=:50055"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
ai-chat-backend:
|
||||
build:
|
||||
context: ../ai-chat-backend
|
||||
image: ai-chat-backend:1.0.0
|
||||
container_name: ai-chat-backend
|
||||
dns:
|
||||
- 223.5.5.5
|
||||
- 119.29.29.29
|
||||
- 8.8.8.8
|
||||
volumes:
|
||||
- /home/lian/share/aichat/ai-chat-stack/configs/ai-chat-backend.yaml:/app/config.yaml:ro
|
||||
depends_on:
|
||||
- ai-chat-service
|
||||
restart: unless-stopped
|
||||
|
||||
ai-chat-web:
|
||||
build:
|
||||
context: ../ai-chat-web
|
||||
image: ai-chat-web:1.0.0
|
||||
container_name: ai-chat-web
|
||||
depends_on:
|
||||
- ai-chat-backend
|
||||
ports:
|
||||
- "1025:80"
|
||||
restart: unless-stopped
|
||||
22
ai-chat-stack/configs/ai-chat-backend.yaml
Normal file
22
ai-chat-stack/configs/ai-chat-backend.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
http:
|
||||
ip: 0.0.0.0
|
||||
port: 7080
|
||||
frontend_path: "www"
|
||||
log:
|
||||
level: "info"
|
||||
logPath: "runtime/logs/app.log"
|
||||
chat:
|
||||
model: "kimi-k2.5"
|
||||
max_tokens: 4096
|
||||
temperature: 1
|
||||
top_p: 1
|
||||
presence_penalty: 0
|
||||
frequency_penalty: 0
|
||||
bot_desc: "你是一个AI助手,我需要你模拟一名资深的软件工程师来回答我的问题"
|
||||
min_response_tokens: 600
|
||||
context_ttl: 1800
|
||||
context_len: 4
|
||||
dependOn:
|
||||
ai-chat-service:
|
||||
address: "ai-chat-service:50055"
|
||||
accessToken: "me256487ang1chubdpdialoud22sev1ozhoguumyqca"
|
||||
54
ai-chat-stack/configs/ai-chat-service.yaml
Normal file
54
ai-chat-stack/configs/ai-chat-service.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
server:
|
||||
ip: 0.0.0.0
|
||||
port: 50055
|
||||
accessToken: "me256487ang1chubdpdialoud22sev1ozhoguumyqca"
|
||||
log:
|
||||
level: "info"
|
||||
logPath: "runtime/logs/app.log"
|
||||
chat:
|
||||
api_key: "sk-8NMdsGbDAMpWdd6hrKHepr1tNVXTy2QppKAqJkoJcHd6TYLs"
|
||||
base_url: "https://api.moonshot.cn/v1"
|
||||
model: "kimi-k2.5"
|
||||
max_tokens: 4096
|
||||
temperature: 1
|
||||
top_p: 0.95
|
||||
presence_penalty: 0
|
||||
frequency_penalty: 0
|
||||
bot_desc: "你是一个AI助手,我需要你模拟一名资深的软件工程师来回答我的问题"
|
||||
min_response_tokens: 600
|
||||
context_ttl: 1800
|
||||
context_len: 4
|
||||
redis:
|
||||
host: "host.docker.internal"
|
||||
port: 8888
|
||||
pwd: "123456"
|
||||
mysql:
|
||||
dsn: "root:root@tcp(mysql:3306)/ai_chat?collation=utf8mb4_unicode_ci&charset=utf8mb4"
|
||||
maxLifeTime: 3600
|
||||
maxOpenConn: 10
|
||||
maxIdleConn: 10
|
||||
dependOn:
|
||||
sensitive:
|
||||
address: "sensitive-filter:50053"
|
||||
accessToken: "ang1chubdev1ozhome256487d22sapguuv1ozhom"
|
||||
keywords:
|
||||
address: "keywords-filter:50054"
|
||||
accessToken: "ang1chubdev1ozhome256487d22sapguuv1ozhom"
|
||||
tokenizer:
|
||||
address: "http://tokenizer:3002"
|
||||
vector:
|
||||
provider: "pgvector"
|
||||
threshold: 0.99
|
||||
pgvector:
|
||||
dsn: "postgres://postgres:postgres@pgvector:5432/ai_chat?sslmode=disable"
|
||||
table: "chat_record_vectors"
|
||||
dimensions: 1024
|
||||
maxLifeTime: 3600
|
||||
maxOpenConn: 10
|
||||
maxIdleConn: 10
|
||||
embedding:
|
||||
provider: "openai-compatible"
|
||||
base_url: "https://open.bigmodel.cn/api/paas/v4"
|
||||
api_key: "d51b903546814cc9981d3649a4a899a3.NQOtz3ocRtQwimh9"
|
||||
model: "embedding-2"
|
||||
timeout: 10
|
||||
192
ai-chat-stack/configs/keywords-dict.txt
Normal file
192
ai-chat-stack/configs/keywords-dict.txt
Normal file
@@ -0,0 +1,192 @@
|
||||
golang
|
||||
defer
|
||||
recover
|
||||
sync
|
||||
Protobuf
|
||||
gin
|
||||
grpc-gateway
|
||||
OpenTelemetry
|
||||
OTel
|
||||
otel
|
||||
k8s
|
||||
Kubernetes
|
||||
kubernetes
|
||||
Docker
|
||||
docker
|
||||
Istio
|
||||
istio
|
||||
Prometheus
|
||||
prometheus
|
||||
cadvisor
|
||||
cAdvisor
|
||||
Elastic
|
||||
Kibana
|
||||
Grafana
|
||||
apiserver
|
||||
CI/CD
|
||||
ci/cd
|
||||
ArgoCD
|
||||
argo
|
||||
Argo
|
||||
kaniko
|
||||
Mesh
|
||||
Volume
|
||||
volume
|
||||
promQL
|
||||
PromQL
|
||||
kafka
|
||||
ingress
|
||||
StorageClass
|
||||
VolumeClaim
|
||||
gitlab
|
||||
openflow
|
||||
dpdk
|
||||
vpp
|
||||
ovs
|
||||
spdk
|
||||
virtio
|
||||
vhost
|
||||
qemu
|
||||
vSwitch
|
||||
bridge
|
||||
hugepage
|
||||
nvme
|
||||
dpvs
|
||||
iperf3
|
||||
rfc2544
|
||||
ioengine
|
||||
PCI
|
||||
vxlan
|
||||
gre
|
||||
kni
|
||||
Kernel
|
||||
内核
|
||||
KernelThread
|
||||
内核线程
|
||||
Virtual
|
||||
memory
|
||||
虚拟内存
|
||||
内存屏障
|
||||
内存管理
|
||||
Scheduler
|
||||
调度器
|
||||
File
|
||||
文件系统
|
||||
Device
|
||||
driver
|
||||
设备驱动程序
|
||||
Syscall
|
||||
系统调用
|
||||
Process
|
||||
scheduling
|
||||
进程调度
|
||||
Page
|
||||
页表
|
||||
Swap
|
||||
交换空间
|
||||
Mount
|
||||
Inode
|
||||
挂载
|
||||
索引节点
|
||||
Block
|
||||
块设备
|
||||
Character
|
||||
字符设备
|
||||
IRQ
|
||||
Kconfig
|
||||
内核配置
|
||||
Perf
|
||||
Ftrace
|
||||
内核跟踪工具
|
||||
Valgrind
|
||||
内存调试工具
|
||||
System
|
||||
系统定时器
|
||||
DMA
|
||||
伙伴系统
|
||||
信号与槽
|
||||
Signals
|
||||
Slots
|
||||
事件处理程序
|
||||
Event
|
||||
QML
|
||||
多线程编程
|
||||
Multithreading
|
||||
Programming
|
||||
QThread
|
||||
QtQuick
|
||||
模型
|
||||
视图架构
|
||||
Model/View
|
||||
QObject
|
||||
QWidget
|
||||
QRegularExpression
|
||||
QDesktopWidget
|
||||
QNetworkAccessManager
|
||||
QTcpServer
|
||||
QTcpSocket
|
||||
QUdpSocket
|
||||
QMutex
|
||||
SQLite/MySQL
|
||||
MySQL编程
|
||||
SQLite编程
|
||||
OpenCV
|
||||
OpenGL
|
||||
Qt数据库编程
|
||||
Qt网络编程
|
||||
Linux
|
||||
tcp
|
||||
redis
|
||||
mysql
|
||||
网络
|
||||
nginx
|
||||
协程
|
||||
io_uring
|
||||
内存泄漏
|
||||
bpf
|
||||
ebpf
|
||||
skynet
|
||||
openresty
|
||||
RocksDB
|
||||
TiDB
|
||||
ceph
|
||||
etcd
|
||||
fuse
|
||||
p2p
|
||||
|
||||
http
|
||||
mqtt
|
||||
cuda
|
||||
mutex
|
||||
spinlock
|
||||
hash
|
||||
rbtree
|
||||
btree
|
||||
Makefile
|
||||
git
|
||||
wrk
|
||||
Cuda
|
||||
CUDA
|
||||
D3D
|
||||
d3d
|
||||
ffmpeg
|
||||
RTSP
|
||||
WebRTC
|
||||
PCM
|
||||
RGB
|
||||
YUv
|
||||
MP4
|
||||
FLV
|
||||
TS
|
||||
VLC
|
||||
EasylCE
|
||||
flvAnalyser
|
||||
mp4box
|
||||
audacity
|
||||
Elecard
|
||||
AAC
|
||||
h264
|
||||
SDL
|
||||
AVFormat
|
||||
AVCodec
|
||||
AVPacket
|
||||
7
ai-chat-stack/configs/keywords.yaml
Normal file
7
ai-chat-stack/configs/keywords.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
server:
|
||||
ip: 0.0.0.0
|
||||
port: 50054
|
||||
accessToken: "ang1chubdev1ozhome256487d22sapguuv1ozhom"
|
||||
log:
|
||||
level: "info"
|
||||
logPath: "runtime/logs/app.log"
|
||||
13992
ai-chat-stack/configs/sensitive-dict.txt
Normal file
13992
ai-chat-stack/configs/sensitive-dict.txt
Normal file
File diff suppressed because it is too large
Load Diff
7
ai-chat-stack/configs/sensitive.yaml
Normal file
7
ai-chat-stack/configs/sensitive.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
server:
|
||||
ip: 0.0.0.0
|
||||
port: 50053
|
||||
accessToken: "ang1chubdev1ozhome256487d22sapguuv1ozhom"
|
||||
log:
|
||||
level: "info"
|
||||
logPath: "runtime/logs/app.log"
|
||||
Reference in New Issue
Block a user