Upload files to "/"
This commit is contained in:
parent
dd8127052a
commit
97f1233806
1 changed files with 3 additions and 2 deletions
|
@ -16,11 +16,12 @@ export default {
|
|||
description: "ask a chatbot that is Powered by OpenAI:tm: whatever the fk you want",
|
||||
arguments: "message",
|
||||
execute(message, args) {
|
||||
const msgnoprefix = message.content.slice(prefix.length + this.name.length);
|
||||
const prompt = message.content.slice(prefix.length + this.name.length);
|
||||
action.reply(message, `generating response for \`${prompt}\``)
|
||||
openai
|
||||
.createChatCompletion({
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [{ role: "user", content: message.content }],
|
||||
messages: [{ role: "user", content: prompt }],
|
||||
})
|
||||
.then((res) => {
|
||||
action.reply(message, res.data.choices[0].message.content);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue