chore: revert

This commit is contained in:
Timothy J. Baek 2024-02-13 01:48:31 -08:00
parent 56966c411b
commit 3057bfe5a0
2 changed files with 3 additions and 4 deletions

View file

@ -167,7 +167,7 @@ export const generateTitle = async (token: string = '', model: string, prompt: s
return res?.response ?? 'New Chat'; return res?.response ?? 'New Chat';
}; };
export const generatePrompt = async (token: string = '', model: string, conversation: string, body: object = {}) => { export const generatePrompt = async (token: string = '', model: string, conversation: string) => {
let error = null; let error = null;
if (conversation === '') { if (conversation === '') {
@ -188,8 +188,7 @@ export const generatePrompt = async (token: string = '', model: string, conversa
As USER in the conversation above, your task is to continue the conversation. Remember, Your responses should be crafted as if you're a human conversing in a natural, realistic manner, keeping in mind the context and flow of the dialogue. Please generate a fitting response to the last message in the conversation, or if there is no existing conversation, initiate one as a normal person would. As USER in the conversation above, your task is to continue the conversation. Remember, Your responses should be crafted as if you're a human conversing in a natural, realistic manner, keeping in mind the context and flow of the dialogue. Please generate a fitting response to the last message in the conversation, or if there is no existing conversation, initiate one as a normal person would.
Response: Response:
`, `
...body
}) })
}).catch((err) => { }).catch((err) => {
console.log(err); console.log(err);

View file

@ -53,7 +53,7 @@
return `${a}### ${message.role.toUpperCase()}\n${message.content}\n\n`; return `${a}### ${message.role.toUpperCase()}\n${message.content}\n\n`;
}, ''); }, '');
const res = await generatePrompt(localStorage.token, model.name, convoText, { keep_alive: $settings.keepAlive ?? undefined }); const res = await generatePrompt(localStorage.token, model.name, convoText);
if (res && res.ok) { if (res && res.ok) {
const reader = res.body const reader = res.body