mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-09-03 14:22:41 +02:00
wip
This commit is contained in:
@@ -183,6 +183,7 @@ export function AIChat(props: AIChatProps) {
|
||||
},
|
||||
credentials: 'include',
|
||||
body: JSON.stringify({
|
||||
chatHistoryId: chatDetails?.chatHistoryId,
|
||||
messages: messages.slice(-10),
|
||||
force,
|
||||
}),
|
||||
|
@@ -24,7 +24,8 @@ export async function readChatStream(
|
||||
break;
|
||||
}
|
||||
|
||||
const text = decoder.decode(value);
|
||||
const textWithNewLine = decoder.decode(value);
|
||||
const text = textWithNewLine.replace(/\n$/, '');
|
||||
|
||||
if (text.startsWith(CHAT_RESPONSE_PREFIX.message)) {
|
||||
const textWithoutPrefix = text.replace(CHAT_RESPONSE_PREFIX.message, '');
|
||||
|
Reference in New Issue
Block a user