don't make changes where not needed

This commit is contained in:
samm81 2023-06-02 13:38:20 -04:00
parent 06d467a252
commit cd6a0b1ff8
No known key found for this signature in database

View file

@ -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)