mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-23 10:57:44 +08:00
feat: Include an empty content field in the final streamed stop chunk and add tests to validate its structure.
This commit is contained in:
@@ -165,7 +165,13 @@ func (s *geminiStreamRuntime) finalize() {
|
||||
s.sendChunk(map[string]any{
|
||||
"candidates": []map[string]any{
|
||||
{
|
||||
"index": 0,
|
||||
"index": 0,
|
||||
"content": map[string]any{
|
||||
"role": "model",
|
||||
"parts": []map[string]any{
|
||||
{"text": ""},
|
||||
},
|
||||
},
|
||||
"finishReason": "STOP",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user