mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
a lot of thingssss
This commit is contained in:
parent
eb0ba140f3
commit
726861294b
14 changed files with 420 additions and 24 deletions
36
commands/message/fun/inferkit.js
Normal file
36
commands/message/fun/inferkit.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
const { createEmbed } = require('../../../labscore/utils/embed')
|
||||
const { format } = require('../../../labscore/utils/ansi')
|
||||
const { editOrReply } = require('../../../labscore/utils/message')
|
||||
const { STATICS } = require('../../../labscore/utils/statics')
|
||||
|
||||
const { inferkit } = require('../../../labscore/api')
|
||||
const { codeblock } = require('../../../labscore/utils/markdown')
|
||||
|
||||
module.exports = {
|
||||
name: 'inferkit',
|
||||
aliases: ['complete'],
|
||||
label: 'text',
|
||||
metadata: {
|
||||
description: 'make ai continue your text',
|
||||
examples: ['complete The Fitness Gram Pacer'],
|
||||
category: 'fun',
|
||||
usage: 'inferkit <prompt>'
|
||||
},
|
||||
run: async (context, args) => {
|
||||
context.triggerTyping();
|
||||
if(!args.text) return editOrReply(context, {embeds:[createEmbed("warning", context, `Missing Parameter (text).`)]})
|
||||
try{
|
||||
let res = await inferkit(context, args.text)
|
||||
return editOrReply(context, {embeds:[createEmbed("default", context, {
|
||||
description: codeblock("ansi", [format(res.response.body.input, "cyan") + res.response.body.output]),
|
||||
footer: {
|
||||
iconUrl: STATICS.inferkit,
|
||||
text: `InferKit • ${context.application.name} • Took ${res.timings}s`
|
||||
}
|
||||
})]})
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
return editOrReply(context, {embeds:[createEmbed("error", context, `Unable to generate text.`)]})
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue