1
0
Fork 0

fix minichat

This commit is contained in:
Pabloader 2026-02-24 07:17:44 +00:00
parent 3f41cea5eb
commit 4d2b1e26f7
2 changed files with 11 additions and 3 deletions

View File

@ -60,8 +60,14 @@ export const MiniChat = ({ history = [], buttons = {}, open, onClose }: IProps)
generating.setTrue(); generating.setTrue();
for await (const chunk of generate(prompt)) { for await (const chunk of generate(prompt)) {
text += chunk; text += chunk.text;
setMessages(MessageTools.updateSwipe(newMessages, messageId, { content: text.trim() })); setMessages(MessageTools.updateSwipe(
newMessages,
messageId,
{
content: text.trim(),
cost: chunk.cost,
}));
} }
generating.setFalse(); generating.setFalse();

View File

@ -251,7 +251,9 @@ export namespace Connection {
} }
} }
} catch (e) { } catch (e) {
console.error('Error in horde generation:', e); if (!signal.aborted) {
console.error('Error in horde generation:', e);
}
return yield deleteRequest(); return yield deleteRequest();
} }
} }