feat(kol): KOL workspace HTTP handlers + route registration
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/geo-platform/tenant-api/internal/shared/response"
|
||||
"github.com/geo-platform/tenant-api/internal/shared/retrieval"
|
||||
"github.com/geo-platform/tenant-api/internal/shared/stream"
|
||||
tenantapp "github.com/geo-platform/tenant-api/internal/tenant/app"
|
||||
"github.com/geo-platform/tenant-api/internal/tenant/prompts"
|
||||
"github.com/geo-platform/tenant-api/internal/tenant/repository"
|
||||
)
|
||||
@@ -47,6 +48,9 @@ type App struct {
|
||||
GenerationStreams *stream.GenerationHub
|
||||
Cache cache.Cache
|
||||
KolProfiles repository.KolProfileRepository
|
||||
KolPackages repository.KolPackageRepository
|
||||
KolPrompts repository.KolPromptRepository
|
||||
KolPromptAsset *tenantapp.KolPromptAsset
|
||||
}
|
||||
|
||||
func New(configPath string) (*App, error) {
|
||||
@@ -99,6 +103,9 @@ func New(configPath string) (*App, error) {
|
||||
generationStreams := stream.NewGenerationHub(mqClient)
|
||||
appCache := cache.New(cfg.Cache.Driver, rdb)
|
||||
kolProfiles := repository.NewKolProfileRepository(pool)
|
||||
kolPackages := repository.NewKolPackageRepository(pool)
|
||||
kolPrompts := repository.NewKolPromptRepository(pool)
|
||||
kolPromptAsset := tenantapp.NewKolPromptAsset(objectStorageClient)
|
||||
|
||||
if cfg.Server.Mode == "release" {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
@@ -153,6 +160,9 @@ func New(configPath string) (*App, error) {
|
||||
GenerationStreams: generationStreams,
|
||||
Cache: appCache,
|
||||
KolProfiles: kolProfiles,
|
||||
KolPackages: kolPackages,
|
||||
KolPrompts: kolPrompts,
|
||||
KolPromptAsset: kolPromptAsset,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user