mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 15:13:04 -04:00
migrate ai commands to obelisk
This commit is contained in:
parent
3b478bd69e
commit
641ab48053
6 changed files with 52 additions and 50 deletions
|
@ -8,6 +8,7 @@ const superagent = require('superagent')
|
|||
const { iconPill, stringwrap, smallIconPill } = require('../../../labscore/utils/markdown')
|
||||
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
const { palm2 } = require('../../../labscore/api/obelisk');
|
||||
|
||||
module.exports = {
|
||||
name: 'palm',
|
||||
|
@ -56,17 +57,9 @@ module.exports = {
|
|||
try{
|
||||
await editOrReply(context, createEmbed("ai_custom", context, STATIC_ICONS.ai_palm_idle))
|
||||
|
||||
let res = await superagent.post(`${process.env.AI_SERVER}/google/palm2/chat`)
|
||||
.set({
|
||||
Authorization: process.env.AI_SERVER_KEY
|
||||
})
|
||||
.send({
|
||||
prompt,
|
||||
input: [input],
|
||||
temperature,
|
||||
model
|
||||
})
|
||||
|
||||
let res = await palm2(context, prompt, input)
|
||||
res = res.response;
|
||||
|
||||
let description = []
|
||||
let files = [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue