feat(llm): add response reducer (#34417)

This commit is contained in:
Shoubhit Dash
2026-06-29 16:26:33 +05:30
committed by GitHub
parent 82a482b36d
commit 48fc9e3cc3
6 changed files with 324 additions and 22 deletions
@@ -21,7 +21,7 @@
"headers": {
"content-type": "text/event-stream"
},
"body": ""
"body": "data: {\"candidates\":[{\"content\":{\"role\":\"model\",\"parts\":[{\"text\":\"Hi.\"}]},\"finishReason\":\"STOP\"}],\"usageMetadata\":{\"promptTokenCount\":1200,\"candidatesTokenCount\":2,\"totalTokenCount\":1202}}\n\n"
}
},
{
@@ -39,7 +39,7 @@
"headers": {
"content-type": "text/event-stream"
},
"body": ""
"body": "data: {\"candidates\":[{\"content\":{\"role\":\"model\",\"parts\":[{\"text\":\"Hi.\"}]},\"finishReason\":\"STOP\"}],\"usageMetadata\":{\"cachedContentTokenCount\":1100,\"promptTokenCount\":1200,\"candidatesTokenCount\":2,\"totalTokenCount\":1202}}\n\n"
}
}
]