mirror of
https://github.com/foxhui/WebAI2API.git
synced 2026-06-16 21:03:59 +08:00
fix: 修复 ChatGPT 文本响应被截断的问题 (closes #19)
This commit is contained in:
@@ -198,7 +198,7 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) {
|
||||
}
|
||||
|
||||
// patch 操作中的 append
|
||||
if (data.o === 'patch' && Array.isArray(data.v)) {
|
||||
if (Array.isArray(data.v)) {
|
||||
for (const patch of data.v) {
|
||||
if (patch.o === 'append' && patch.p === '/message/content/parts/0' && patch.v) {
|
||||
textContent += patch.v;
|
||||
|
||||
Reference in New Issue
Block a user