mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
allow changing temperature
This commit is contained in:
parent
ebfa62cd2a
commit
3d48bfce82
1 changed files with 11 additions and 3 deletions
|
@ -21,6 +21,7 @@ module.exports = {
|
|||
},
|
||||
args: [
|
||||
{ name: 'prompt', default: '', required: false, help: "The starting system prompt." },
|
||||
{ name: 'temperature', default: 0.5, required: false, help: "Model temperature." },
|
||||
{ name: 'model', default: 'CHATGPT', required: false, help: "The model to use. (Restricted to CHATGPT)" },
|
||||
],
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.ATTACH_FILES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY],
|
||||
|
@ -38,6 +39,13 @@ module.exports = {
|
|||
model = args.model
|
||||
modelDisplay = " " + smallIconPill("robot", model)
|
||||
}
|
||||
|
||||
let temperature = "CHATGPT"
|
||||
let temperatureDisplay = ""
|
||||
if(args.temperature){
|
||||
temperature = parseFloat(args.temperature)
|
||||
temperatureDisplay = " " + smallIconPill("example", temperature)
|
||||
}
|
||||
|
||||
try{
|
||||
await editOrReply(context, createEmbed("ai", context, "Generating response..."))
|
||||
|
@ -47,10 +55,10 @@ module.exports = {
|
|||
Authorization: process.env.AI_SERVER_KEY
|
||||
})
|
||||
.send({
|
||||
prompt: prompt,
|
||||
prompt,
|
||||
input: [args.text],
|
||||
temperature: 0.6,
|
||||
model: model
|
||||
temperature,
|
||||
model
|
||||
})
|
||||
|
||||
let description = [smallIconPill("generative_ai", args.text) + modelDisplay, '']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue