fix: add model to response (close #1362)

This commit is contained in:
JustSong 2024-04-24 22:19:58 +08:00
parent 0a650b85b4
commit da0842272c

View File

@ -53,6 +53,7 @@ func responseOllama2OpenAI(response *ChatResponse) *openai.TextResponse {
} }
fullTextResponse := openai.TextResponse{ fullTextResponse := openai.TextResponse{
Id: fmt.Sprintf("chatcmpl-%s", random.GetUUID()), Id: fmt.Sprintf("chatcmpl-%s", random.GetUUID()),
Model: response.Model,
Object: "chat.completion", Object: "chat.completion",
Created: helper.GetTimestamp(), Created: helper.GetTimestamp(),
Choices: []openai.TextResponseChoice{choice}, Choices: []openai.TextResponseChoice{choice},