feat: Refactor Qwen stream event processing workflow (#939)

This commit is contained in:
Kent Dong
2024-05-15 11:43:45 +08:00
committed by GitHub
parent 8043780de0
commit 559a109ae5
4 changed files with 98 additions and 52 deletions

View File

@@ -28,12 +28,11 @@ const (
ctxKeyStreamingBody = "streamingBody"
ctxKeyOriginalRequestModel = "originalRequestModel"
ctxKeyFinalRequestModel = "finalRequestModel"
ctxKeyPushedMessageContent = "pushedMessageContent"
objectChatCompletion = "chat.completion"
objectChatCompletionChunk = "chat.completion.chunk"
finishReasonStop = "stop"
wildcard = "*"
defaultTimeout = 2 * 60 * 1000 // ms