feat: add workbench AI integration

This commit is contained in:
richjohnrambo
2026-09-28 11:28:24 +08:00
parent 5bf68727fa
commit 8773991015
19 changed files with 6971 additions and 10 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import (
"net/http"
"time"
"git.118im.com/im_team/im_workbench/internal/ai"
"git.118im.com/im_team/im_workbench/internal/auth"
"git.118im.com/im_team/im_workbench/internal/config"
"git.118im.com/im_team/im_workbench/internal/events"
@@ -57,11 +58,12 @@ func New(cfg *config.Config) (*App, error) {
_ = st.Close()
return nil, err
}
aiService := ai.NewService(ai.NewClient(cfg.AI))
return &App{
store: st,
redis: redisClient,
events: publisher,
api: httpapi.New(st, auth.New(cfg.Auth, redisClient), publisher, cfg.Auth),
api: httpapi.New(st, auth.New(cfg.Auth, redisClient), publisher, cfg.Auth, aiService),
}, nil
}