moving port to .env
This commit is contained in:
parent
4b3cda8eff
commit
8c192acd7d
@ -25,6 +25,8 @@ Message intents are NOT supported in this bot, this is due to the verification t
|
|||||||
TOKEN = (Discord Token)
|
TOKEN = (Discord Token)
|
||||||
INTERNAL_IP = (The Internal IP Address of the Server running Serge)
|
INTERNAL_IP = (The Internal IP Address of the Server running Serge)
|
||||||
PUBLIC_URL = (The public URL of your Serge install)
|
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
|
4) Go into https://discord.com/developers/applications and enable Privileged Intents
|
||||||
|
@ -47,7 +47,7 @@ module.exports = {
|
|||||||
'accept': 'text',
|
'accept': 'text',
|
||||||
};
|
};
|
||||||
console.log(session);
|
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
|
headers
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ var unirest = require('unirest');
|
|||||||
const jsonfile = require('jsonfile')
|
const jsonfile = require('jsonfile')
|
||||||
|
|
||||||
// Start session defaults:
|
// 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 model = 'gpt4all';
|
||||||
var temperature = 0.1;
|
var temperature = 0.1;
|
||||||
|
@ -31,7 +31,7 @@ module.exports = {
|
|||||||
'accept': 'text/event-stream',
|
'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
|
headers
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user