Update notclyde.js
This commit is contained in:
parent
ddbaa65a16
commit
a6d91f2eb1
1 changed files with 2 additions and 2 deletions
|
@ -17,14 +17,14 @@ export default {
|
|||
arguments: "message",
|
||||
execute(message, args) {
|
||||
const prompt = message.content.slice(prefix.length + this.name.length);
|
||||
action.reply(message, `generating response for \`${prompt}\``)
|
||||
const sent = action.reply(message, `generating response for \`${prompt}\``)
|
||||
openai
|
||||
.createChatCompletion({
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [{ role: "user", content: prompt }],
|
||||
})
|
||||
.then((res) => {
|
||||
action.reply(message, res.data.choices[0].message.content);
|
||||
action.edit(sent, res.data.choices[0].message.content);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue