Commit a35cda68 by archer

fix: destroy后仍有push流

parent 30678d8e
......@@ -141,6 +141,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
console.log('pipe error', error);
}
// close stream
!stream.destroyed && stream.push(null);
stream.destroy();
const promptsLen = formatPrompts.reduce((sum, item) => sum + item.content.length, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment