tests: add sanity check test for the /edit endpoint

This commit is contained in:
mudler 2023-04-29 08:57:45 +02:00
parent 44c0f341a2
commit 7f65b150b3
4 changed files with 24 additions and 35 deletions

View file

@ -273,7 +273,7 @@ func chatEndpoint(cm ConfigMerger, debug bool, loader *model.ModelLoader, thread
log.Debug().Msgf("Parameter Config: %+v", config)
predInput := input.Prompt
var predInput string
mess := []string{}
for _, i := range input.Messages {
@ -346,7 +346,7 @@ func chatEndpoint(cm ConfigMerger, debug bool, loader *model.ModelLoader, thread
resp := &OpenAIResponse{
Model: input.Model, // we have to return what the user sent here, due to OpenAI spec.
Choices: []Choice{Choice{FinishReason: "stop"}},
Choices: []Choice{{FinishReason: "stop"}},
}
respData, _ := json.Marshal(resp)