Skip to content

Commit

Permalink
fix: fix model mapping cannot be deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Jul 29, 2023
1 parent 50dec03 commit f45d586
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/relay-text.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
// map model name
modelMapping := c.GetString("model_mapping")
isModelMapped := false
if modelMapping != "" {
if modelMapping != "" && modelMapping != "{}" {
modelMap := make(map[string]string)
err := json.Unmarshal([]byte(modelMapping), &modelMap)
if err != nil {
Expand Down

0 comments on commit f45d586

Please sign in to comment.