From cd6a0b1ff81a93df6df43f06216c8bf5482267d4 Mon Sep 17 00:00:00 2001 From: samm81 Date: Fri, 2 Jun 2023 13:38:20 -0400 Subject: [PATCH] don't make changes where not needed --- api/openai.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/openai.go b/api/openai.go index de159053..73881e4c 100644 --- a/api/openai.go +++ b/api/openai.go @@ -243,12 +243,13 @@ func completionEndpoint(cm *ConfigMerger, o *Option) func(c *fiber.Ctx) error { } resp := &OpenAIResponse{ - Model: input.Model, // we have to return what the user sent here, due to OpenAI spec. + Model: input.Model, // we have to return what the user sent here, due to OpenAI spec. Choices: result, Object: "text_completion", } - respData, _ := json.Marshal(resp) - log.Debug().Msgf("Response: %s", respData) + + jsonResult, _ := json.Marshal(resp) + log.Debug().Msgf("Response: %s", jsonResult) // Return the prediction in the response body return c.JSON(resp)