mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
update endpoint
This commit is contained in:
parent
cf62e33d19
commit
7076740ac3
1 changed files with 3 additions and 2 deletions
|
@ -22,14 +22,15 @@ module.exports = {
|
|||
context.triggerTyping();
|
||||
if(!args.text) return editOrReply(context, {embeds:[createEmbed("warning", context, `Missing Parameter (text).`)]})
|
||||
try{
|
||||
let res = await superagent.post(`${process.env.AI_SERVER}/chatgpt`)
|
||||
let res = await superagent.post(`${process.env.AI_SERVER}/openai`)
|
||||
.set({
|
||||
Authorization: process.env.AI_SERVER_KEY
|
||||
})
|
||||
.send({
|
||||
prompt: "You are a friendly chat bot designed to help people. You should always use gender neutral pronouns when possible.",
|
||||
input: [args.text],
|
||||
temperature: 0.6
|
||||
temperature: 0.6,
|
||||
model: "CHATGPT"
|
||||
})
|
||||
return editOrReply(context, {embeds:[createEmbed("default", context, {
|
||||
description: codeblock("ansi", ["👤 " + format(args.text, "cyan") + "\n🤖 " + res.body.output.substr(0, 2000 - args.text.length)]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue