mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 03:48:24 +00:00
perf: markdown more wrap (#365)
This commit is contained in:
@@ -11,7 +11,7 @@ export function responseWriteController({
|
||||
readStream.resume();
|
||||
});
|
||||
|
||||
return (text: string) => {
|
||||
return (text: string | Buffer) => {
|
||||
const writeResult = res.write(text);
|
||||
if (!writeResult) {
|
||||
readStream.pause();
|
||||
|
@@ -23,7 +23,7 @@ export const dispatchAnswer = (props: Record<string, any>): AnswerResponse => {
|
||||
res,
|
||||
event: detail ? sseResponseEventEnum.answer : undefined,
|
||||
data: textAdaptGptResponse({
|
||||
text: text.replace?.(/\\n/g, '\n') || ''
|
||||
text
|
||||
})
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user