feat: add configurable AgentRouter AI provider
This commit is contained in:
@@ -43,7 +43,8 @@ func main() {
|
||||
defer redisClient.Close()
|
||||
repository := growthreport.NewRepository(pool)
|
||||
coordinator := growthreport.NewCoordinator(redisClient, growthreport.CoordinatorConfig{CreatePerMinute: cfg.AICreatePerMinute, UncachedPerDay: cfg.AIUncachedScopesPerDay, DailyRequests: cfg.AIDailyRequestBudget, DailyTokens: cfg.AIDailyTokenBudget, MaxConcurrent: cfg.AIMaxConcurrent})
|
||||
growthService := growthreport.NewService(repository, coordinator, growthreport.ServiceConfig{Enabled: cfg.AIGrowthEnabled, Model: cfg.AvalAIModel, PromptVersion: "1.0.0", SchemaVersion: "1.0.0"})
|
||||
provider := cfg.SelectedAIProvider()
|
||||
growthService := growthreport.NewService(repository, coordinator, growthreport.ServiceConfig{Enabled: cfg.AIGrowthEnabled, Model: provider.Model, PromptVersion: "1.0.5", SchemaVersion: "1.0.1"})
|
||||
insightRepository := insight.NewRepository(pool)
|
||||
insightService := insight.NewService(insightRepository, insight.NewPostgreSQLBuilder(pool))
|
||||
appServer := api.NewServer(identity.New(pool), analytics.New(pool, cfg.CursorSecret), logger, cfg.FrontendOrigin, cfg.CookieSecure, growthService)
|
||||
|
||||
Reference in New Issue
Block a user