mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-27 12:54:09 +01:00
remove unused packages and minor changes
This commit is contained in:
parent
ed44daf8b3
commit
5b8c4452cc
5 changed files with 10 additions and 26 deletions
|
|
@ -22,7 +22,7 @@ const ask = async (question, progressCallback, convo) => {
|
|||
return res;
|
||||
};
|
||||
|
||||
const titleConversation = async (message, response) => {
|
||||
const titleConvo = async (message, response) => {
|
||||
const configuration = new Configuration({
|
||||
apiKey: process.env.OPENAI_KEY
|
||||
});
|
||||
|
|
@ -31,8 +31,8 @@ const titleConversation = async (message, response) => {
|
|||
model: 'text-davinci-002',
|
||||
prompt: `Write a short title in title case, ideally in 5 words or less, and do not refer to the user or GPT, that summarizes this conversation:\nUser:"${message}"\nGPT:"${response}"\nTitle: `
|
||||
});
|
||||
console.log(completion.data.choices[0].text);
|
||||
|
||||
return completion.data.choices[0].text.replace(/\n/g, '');
|
||||
};
|
||||
|
||||
module.exports = { ask, titleConversation };
|
||||
module.exports = { ask, titleConvo };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue