Skip to content

Commit

Permalink
feat: use specific model name for openai protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Feb 9, 2024
1 parent 9c0c975 commit 2f0d71e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apis/record/infer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func InferOpenAI(
client := openai.NewClientWithConfig(openaiConfig)

request := openai.ChatCompletionRequest{
Model: model.Description,
Model: model.OpenAIModelName,
Messages: postRecord.ToOpenAIMessages(),
}

Expand Down
1 change: 1 addition & 0 deletions models/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f0d71e

Please sign in to comment.