new(whatsapp.gblib): Let GPT help call centers...

This commit is contained in:
Rodrigo Rodriguez 2023-08-02 14:27:15 -03:00
parent a67e1457aa
commit 20c13c1a4a
2 changed files with 4 additions and 1 deletions

View file

@ -694,6 +694,9 @@ export class DialogKeywords {
/**
* Returns the name of the user acquired by WhatsApp API.
*
* SAVE "file.xlsx", username, now
*
*/
public async userName({ pid }) {
let { min, user, params } = await DialogKeywords.getProcessInfo(pid);

View file

@ -60,7 +60,7 @@ export class ChatServices {
model: "gpt-3.5-turbo",
messages: [{role: "user", content: text}],
});
return chatCompletion.data.choices[0].message;
return chatCompletion.data.choices[0].message.content;
}
}