moving port to .env

This commit is contained in:
Raven Scott 2023-04-07 21:18:40 +02:00
parent 4b3cda8eff
commit 8c192acd7d
4 changed files with 5 additions and 3 deletions

View File

@ -25,6 +25,8 @@ Message intents are NOT supported in this bot, this is due to the verification t
TOKEN = (Discord Token)
INTERNAL_IP = (The Internal IP Address of the Server running Serge)
PUBLIC_URL = (The public URL of your Serge install)
SERGE_PORT = (The PORT of your Serge install) - DEFAULT: 8008
```
4) Go into https://discord.com/developers/applications and enable Privileged Intents

View File

@ -47,7 +47,7 @@ module.exports = {
'accept': 'text',
};
console.log(session);
const response = await axios.post(`http://${process.env.INTERNAL_IP}:8008/api/chat/${sessionID}/question?prompt=${prompt}`, {
const response = await axios.post(`http://${process.env.INTERNAL_IP}:${process.env.SERGE_PORT}/api/chat/${sessionID}/question?prompt=${prompt}`, {
headers
});

View File

@ -3,7 +3,7 @@ var unirest = require('unirest');
const jsonfile = require('jsonfile')
// Start session defaults:
var apiUrl = `http://${process.env.INTERNAL_IP}:8008/api/chat/`;
var apiUrl = `http://${process.env.INTERNAL_IP}:${process.env.SERGE_PORT}/api/chat/`;
var model = 'gpt4all';
var temperature = 0.1;

View File

@ -31,7 +31,7 @@ module.exports = {
'accept': 'text/event-stream',
};
const response = await axios.get(`http://${process.env.INTERNAL_IP}:8008/api/chat/${sessionID}`, {
const response = await axios.get(`http://${process.env.INTERNAL_IP}:${process.env.SERGE_PORT}/api/chat/${sessionID}`, {
headers
});