mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-22 02:14:10 +01:00
adding clear methods for convos
This commit is contained in:
parent
c7c50dbbab
commit
6e3f63ee46
16 changed files with 466 additions and 121 deletions
|
|
@ -29,7 +29,7 @@ const titleConversation = async (message, response) => {
|
|||
const openai = new OpenAIApi(configuration);
|
||||
const completion = await openai.createCompletion({
|
||||
model: 'text-davinci-002',
|
||||
prompt: `Make a short title (goal: 5 words or less) in title case summarizing this conversation:\nuser:"${message}"\nGPT:"${response}"\nTitle: `
|
||||
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, '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue