diff --git a/apis/record/infer.go b/apis/record/infer.go index ad9dc6f..5956af6 100644 --- a/apis/record/infer.go +++ b/apis/record/infer.go @@ -63,7 +63,7 @@ func InferOpenAI( client := openai.NewClientWithConfig(openaiConfig) request := openai.ChatCompletionRequest{ - Model: model.Description, + Model: model.OpenAIModelName, Messages: postRecord.ToOpenAIMessages(), } diff --git a/models/config.go b/models/config.go index 3d327a3..e49b528 100644 --- a/models/config.go +++ b/models/config.go @@ -23,6 +23,7 @@ type ModelConfig struct { Url string `json:"url"` CallbackUrl string `json:"callback_url"` APIType APIType `json:"api_type"` + OpenAIModelName string `json:"openai_model_name"` } type ModelConfigs = []*ModelConfig