Minor updates
This commit is contained in:
parent
08618e2be2
commit
7c09aaffaa
@ -397,7 +397,7 @@ const functions = {
|
||||
generatingResponse() {
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setAuthor({ name: "NodBot powered by OpenAI", iconURL: "https://assets.vfsh.dev/openai-logos/PNGs/openai-logomark.png" })
|
||||
.setImage("https://tenor.com/view/sucks-gif-4499658")
|
||||
.setImage("https://media.tenor.com/aHMHzNGCb4kAAAAC/sucks.gif")
|
||||
.setDescription("Generating a response, please stand by.")
|
||||
.setFooter({ text: "Ligma balls" });
|
||||
return { embeds: [embed] };
|
||||
|
@ -15,7 +15,7 @@ module.exports = {
|
||||
await interaction.editReply(fn.embeds.generatingResponse());
|
||||
const userPrompt = interaction.options.getString("prompt");
|
||||
const response = await fn.openAI.chatPrompt(userPrompt).catch(e => console.error(e));
|
||||
const responseText = response.choices[0].text.slice(2);
|
||||
const responseText = response.choices[0].text;
|
||||
const usage = {
|
||||
tokens: response.usage.total_tokens,
|
||||
usdc: response.usage.total_tokens * ( 0.2 / 1000 ) // 0.2¢ per 1000 tokens or 0.0002¢ per token.
|
||||
|
Loading…
Reference in New Issue
Block a user