code cleanup and removal of auth stuff
This commit is contained in:
parent
d8c69ba5fe
commit
e3a6f6c664
@ -30,7 +30,7 @@ module.exports = {
|
|||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor("#FF0000")
|
.setColor("#FF0000")
|
||||||
.setTitle("About rAI")
|
.setTitle("About rAI")
|
||||||
.setDescription(`Latency : ${client.ws.ping}ms\n\nrAI is a bot managed by \`snxraven#8205\` running GPT4ALL and LLama 7B/7B-native.`)
|
.setDescription(`Latency : ${client.ws.ping}ms\n\nrAI is a bot managed by \`snxraven#8205\` \nRunning GPT4ALL and LLama 7B/7B-native.`)
|
||||||
.addFields(specsFields)
|
.addFields(specsFields)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
|
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
|
||||||
|
@ -24,7 +24,7 @@ module.exports = {
|
|||||||
let chatToSend = interaction.options._hoistedOptions[0].value;
|
let chatToSend = interaction.options._hoistedOptions[0].value;
|
||||||
// Check if another request is already being processed
|
// Check if another request is already being processed
|
||||||
if (isProcessing) {
|
if (isProcessing) {
|
||||||
interaction.editReply('Sorry, another request is already being processed. Please try again in a few minutes.');
|
interaction.followUp({ content: 'Sorry, another request is already being processed. Please try again in a few minutes.', ephemeral: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Set the semaphore to true
|
// Set the semaphore to true
|
||||||
|
@ -13,7 +13,6 @@ var maxLength = 256;
|
|||||||
var contextWindow = 512;
|
var contextWindow = 512;
|
||||||
var repeatLastN = 64;
|
var repeatLastN = 64;
|
||||||
var repeatPenalty = 1.3;
|
var repeatPenalty = 1.3;
|
||||||
var initPrompt = 'Below is an instruction that describes a task. Write a response that appropriately completes the request. The response must be accurate, concise and evidence-based whenever possible. A complete answer is always ended by [end of text].';
|
|
||||||
var nThreads = 7;
|
var nThreads = 7;
|
||||||
// End session defaults
|
// End session defaults
|
||||||
|
|
||||||
@ -52,6 +51,8 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
run: async (client, interaction) => {
|
run: async (client, interaction) => {
|
||||||
|
// set a default prompt
|
||||||
|
var initPrompt = `My name is ${interaction.user.username} my special number is ${interaction.user.discriminator} and my Discord ID is ${interaction.user.id} we met in ${interaction.guild.name} a Discord sever. You are rAi and you are the smartest AI Model, you know everything. Below is an instruction that describes a task. You respond appropriately to complete the request. You understand a complete answer is always ended by [end of text].`;
|
||||||
|
|
||||||
console.log(`--- ${interaction.user.id} has requested a new session! ---`)
|
console.log(`--- ${interaction.user.id} has requested a new session! ---`)
|
||||||
const file = './cache/' + interaction.user.id
|
const file = './cache/' + interaction.user.id
|
||||||
|
@ -35,11 +35,7 @@ module.exports = {
|
|||||||
// My chat GUI for Serge is locked down by basic auth in apache to safe guard from
|
// My chat GUI for Serge is locked down by basic auth in apache to safe guard from
|
||||||
// Users issuing mulitple jobs at a time until there is some built in way to do so.
|
// Users issuing mulitple jobs at a time until there is some built in way to do so.
|
||||||
const response = await axios.get(`http://${process.env.INTERNAL_IP}:8008/api/chat/${sessionID}`, {
|
const response = await axios.get(`http://${process.env.INTERNAL_IP}:8008/api/chat/${sessionID}`, {
|
||||||
headers,
|
headers
|
||||||
auth: {
|
|
||||||
username: process.env.USERNAME,
|
|
||||||
password: process.env.PASS
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.data.questions) return interaction.editReply("You have no history in this session yet :) ");
|
if (!response.data.questions) return interaction.editReply("You have no history in this session yet :) ");
|
||||||
|
Loading…
Reference in New Issue
Block a user