feat: add workbench AI integration
This commit is contained in:
+3
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user