feat: support chatglm-4 (close #1045, close #952, close #952, close #943)

This commit is contained in:
JustSong
2024-03-02 03:05:25 +08:00
parent f9490bb72e
commit 1d0b7fb5ae
9 changed files with 59 additions and 14 deletions

View File

@@ -81,6 +81,7 @@ func responseTencent2OpenAI(response *ChatResponse) *openai.TextResponse {
func streamResponseTencent2OpenAI(TencentResponse *ChatResponse) *openai.ChatCompletionsStreamResponse {
response := openai.ChatCompletionsStreamResponse{
Id: fmt.Sprintf("chatcmpl-%s", helper.GetUUID()),
Object: "chat.completion.chunk",
Created: helper.GetTimestamp(),
Model: "tencent-hunyuan",