code cleanup and removal of auth stuff

This commit is contained in:
Raven Scott 2023-04-07 20:54:46 +02:00
parent d8c69ba5fe
commit e3a6f6c664
4 changed files with 6 additions and 9 deletions

View File

@ -30,7 +30,7 @@ module.exports = {
const embed = new EmbedBuilder()
.setColor("#FF0000")
.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)
.setTimestamp()
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });

View File

@ -24,7 +24,7 @@ module.exports = {
let chatToSend = interaction.options._hoistedOptions[0].value;
// Check if another request is already being processed
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;
}
// Set the semaphore to true

View File

@ -13,7 +13,6 @@ var maxLength = 256;
var contextWindow = 512;
var repeatLastN = 64;
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;
// End session defaults
@ -52,7 +51,9 @@ module.exports = {
],
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! ---`)
const file = './cache/' + interaction.user.id

View File

@ -35,11 +35,7 @@ module.exports = {
// 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.
const response = await axios.get(`http://${process.env.INTERNAL_IP}:8008/api/chat/${sessionID}`, {
headers,
auth: {
username: process.env.USERNAME,
password: process.env.PASS
}
headers
});
if (!response.data.questions) return interaction.editReply("You have no history in this session yet :) ");