|
|
|
@@ -41,11 +41,13 @@ type AiService struct { |
|
|
|
} |
|
|
|
|
|
|
|
func NewAiService(conf *config.Config, storages *database.AiStorage, localCache map[string]interface{}) (*AiService, error) { |
|
|
|
var aiType = "1" |
|
|
|
adapterIds, err := storages.GetAdapterIdsByType(aiType) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
//var aiType = "1" |
|
|
|
var tempAdapterId = "1777144940459986944" |
|
|
|
adapterIds := []string{tempAdapterId} |
|
|
|
//adapterIds, err := storages.GetAdapterIdsByType(aiType) |
|
|
|
//if err != nil { |
|
|
|
// return nil, err |
|
|
|
//} |
|
|
|
aiService := &AiService{ |
|
|
|
AiExecutorAdapterMap: make(map[string]map[string]executor.AiExecutor), |
|
|
|
AiCollectorAdapterMap: make(map[string]map[string]collector.AiCollector), |
|
|
|
@@ -106,7 +108,7 @@ func InitAiClusterMap(conf *config.Config, clusters []types.ClusterInfo) (map[st |
|
|
|
inferenceMap[c.Id] = sgai |
|
|
|
case OPENI: |
|
|
|
id, _ := strconv.ParseInt(c.Id, 10, 64) |
|
|
|
openi := storeLink.NewOpenI(c.Server, id, c.Username, c.Token, c.Nickname) |
|
|
|
openi := storeLink.NewOpenI("http://localhost:2024", id, c.Username, c.Token, c.Nickname) |
|
|
|
collectorMap[c.Id] = openi |
|
|
|
executorMap[c.Id] = openi |
|
|
|
inferenceMap[c.Id] = openi |
|
|
|
|