remove other platform supports, ONLY use chatGPT API

This commit is contained in:
RockYang
2024-07-22 18:36:58 +08:00
parent 09f44e6d9b
commit e17dcf4d5f
14 changed files with 74 additions and 1147 deletions

View File

@@ -54,7 +54,7 @@ type apiErrRes struct {
func OpenAIRequest(db *gorm.DB, prompt string) (string, error) {
var apiKey model.ApiKey
res := db.Where("platform", types.OpenAI.Value).Where("type", "chat").Where("enabled", true).First(&apiKey)
res := db.Where("type", "chat").Where("enabled", true).First(&apiKey)
if res.Error != nil {
return "", fmt.Errorf("error with fetch OpenAI API KEY%v", res.Error)
}