feat: Add Jimeng image generation service and related functionality

- Implemented JimengService for image generation with API integration.
- Created OSSService for handling image uploads to S3.
- Developed PBService for managing PocketBase interactions.
- Added task management for image creation and downloading using BullMQ.
- Introduced routes for creating image generation tasks.
- Implemented logging and error handling for image processing.
- Added configuration management for Redis and other services.
- Created scripts for testing image generation and PocketBase integration.
- Updated package dependencies and added new scripts for worker management.
This commit is contained in:
2026-01-09 02:55:04 +08:00
parent 7cca41b457
commit 9da3d14752
31 changed files with 3193 additions and 5 deletions

View File

@@ -1 +1,85 @@
KEVISUAL_NEW_API_KEY=sk-YyVo5WqJBmAnhIPfww9XpUPvHNhsuiXs9a1OSfBul94d7O47
LOG_LEVEL=DEBUG
IS_DEV=true
POSTGRES_HOST=1.15.101.247
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=abearxiong!
POSTGRES_DB=postgres
# DATABASE_URL=postgresql://postgres:abearxiong!@1.15.101.247:5432/postgres
DATABASE_URL=postgresql://postgres:abearxiong@118.196.32.29:5432/postgres
REDIS_HOST=light.xiongxiao.me
REDIS_PORT=6379
REDIS_PASSWORD=abearxiong!
REDIS_DB=0
# POCKETBASE
POCKETBASE_URL=https://pocketbase.pro.xiongxiao.me
POCKETBASE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2xsZWN0aW9uSWQiOiJwYmNfMzE0MjYzNTgyMyIsImV4cCI6MTc3NTYyODY5NywiaWQiOiI0cGRtMXF4cjlkOXNuam0iLCJyZWZyZXNoYWJsZSI6ZmFsc2UsInR5cGUiOiJhdXRoIn0.2ABYhI0ayxpEV09gNvWUIM0lXfAx7hfBT02WcVPmyNw
# S3
S3_ACCESS_KEY_ID=AKLTOWNhNmJkNDJmNzFkNGI3MDlmMWQzYTA2ZjBkYTc2YTg
S3_ACCESS_KEY_SECRET=TWpjME9EVm1OVFJtTkROaE5ESXlaR0ptWlRnd1lqVm1Nems0TW1Ka1pUZw==
S3_REGION=cn-shanghai
S3_BUCKET_NAME=envision
S3_ENDPOINT=https://tos-s3-cn-shanghai.volces.com
# Minio 配置
MINIO_ENDPOINT=light.xiongxiao.me
MINIO_PORT=9000
MINIO_BUCKET_NAME=resources
MINIO_USE_SSL=false
MINIO_ACCESS_KEY=abearxiong
MINIO_SECRET_KEY=xiongxiao
# 域名
DOMAIN=xiongxiao.me
PORT=4005
# 代理配置
PROXY_DOMAIN=kevisual.xiongxiao.me
PROXY_RESOURCES=http://localhost:9000/resources
PROXY_ALLOWED_ORIGINS=localhost,xiongxiao.me
KEVISUAL_NEW_API_KEY=sk-YyVo5WqJBmAnhIPfww9XpUPvHNhsuiXs9a1OSfBul94d7O47
KEVISUAL_TOKEN="st_c7kyhg7sfhhhpiogydyogpoqzgzrnas7"
KEVISUAL_PASSWORD=123456xx
## gitea
GITEA_URL=https://git.xiongxiao.me
GITEA_TOKEN=18cd3c00308c3813765dde41d093d48bed76fabd
## ---- AI ----
# BAILIAN API
BAILIAN_API_KEY='sk-0fc39ea048484ccf9e35e4ed4b4950be'
ZHIPU_API_KEY="6e7a1bc2760a4bd79c6f436b552527be.2j8Ob751NKi6oiVY"
MINIMAX_API_KEY="sk-cp-_nvABjDELuG_o3_vmvlo0uAY1jHJAxglKqKly8ihAxKJcbCyvwqsld08c3R4QZbNfocMn1juB_FdUc1sdjC-gXj5unVykTJ2a6THYaWozQkNyJ5FwJ_aJdI"
# jimeng API
JIMENG_API_KEY=4e962fc85078d5bfc02c9882bfe659eb
JIMENG_API_URL=https://jimeng-api.kevisual.cn/v1
JIMENG_TIMEOUT=300000
VOLCENGINE_AUC_APPID=6968490116
VOLCENGINE_AUC_TOKEN=t1WIgIEUswuunOReyW8kiRCe5lW_lcFB
#-------
DATA_WEBSITE_ID=5fd42d1d-109e-43ab-b3a7-d4fda0c92d13
## 微信
# 微信开放平台 登陆
WX_OPEN_APP_ID=wx9378885c8390e09b
WX_OPEN_APP_SECRET=4a0d588fe0de9713ad0a7e680be3d225
# 微信公众号 登陆
WX_MP_APP_ID=wxff97d569b1db16b6
WX_MP_APP_SECRET=012d84d0d2b914de95f4e9ca84923aed
##
# Queue
QUEUE_CONCURRENCY=5
QUEUE_MAX_FAILED=10
FEISHU_NOTIFY_WEBHOOK_URL=https://open.feishu.cn/open-apis/bot/v2/hook/c1c32e36-ddc6-4965-8943-fc826f4f5060