moving default model settings to .env
This commit is contained in:
parent
3326ffbb6c
commit
e3c5341561
11
README.md
11
README.md
@ -30,16 +30,9 @@ Message intents are NOT supported in this bot, this is due to the verification t
|
||||
|
||||
1) Use ```npm i ```
|
||||
|
||||
2) Create a .env file ``` touch .env```
|
||||
2) Create a .env file ``` cp default.env .env```
|
||||
|
||||
3) Edit .env
|
||||
```
|
||||
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
|
||||
|
||||
```
|
||||
3) Edit .env ```nano .env```
|
||||
|
||||
4) Go into https://discord.com/developers/applications and enable Privileged Intents
|
||||
|
||||
|
@ -5,24 +5,23 @@ const jsonfile = require('jsonfile')
|
||||
// Start session defaults:
|
||||
var apiUrl = `http://${process.env.INTERNAL_IP}:${process.env.SERGE_PORT}/api/chat/`;
|
||||
|
||||
var model = 'gpt4all';
|
||||
var temperature = 0.1;
|
||||
var topK = 50;
|
||||
var topP = 0.95;
|
||||
var maxLength = 256;
|
||||
var contextWindow = 512;
|
||||
var repeatLastN = 64;
|
||||
var repeatPenalty = 1.3;
|
||||
var nThreads = 7;
|
||||
var model = process.env.MODEL;
|
||||
var temperature = process.env.TEMPERATURE;
|
||||
var topK = process.env.TOPK;
|
||||
var topP = process.env.TOPP;
|
||||
var maxLength = process.env.MAXLENGTH;
|
||||
var contextWindow = process.env.CONTEXTWINDOW;
|
||||
var repeatLastN = process.env.REPEATLASTN;
|
||||
var repeatPenalty = process.env.REPEATPENALTY;
|
||||
var nThreads = process.env.NTHREADS;
|
||||
// End session defaults
|
||||
|
||||
|
||||
// Set model list we have downloaded
|
||||
let modelList = ["7B", "7B-native", "gpt4all"]
|
||||
|
||||
module.exports = {
|
||||
name: "create-session",
|
||||
description: "create a new chat session",
|
||||
description: "create a new session",
|
||||
private: true,
|
||||
options: [{
|
||||
"name": "model",
|
||||
|
12
default.env
12
default.env
@ -1,4 +1,14 @@
|
||||
TOKEN = ""
|
||||
INTERNAL_IP = ""
|
||||
PUBLIC_URL = ""
|
||||
SERGE_PORT = "8008"
|
||||
SERGE_PORT = "8008"
|
||||
|
||||
MODEL = "7B"
|
||||
TEMPERATURE = "0.1"
|
||||
TOPK = "50"
|
||||
TOPP = "0.95"
|
||||
MAXLENGTH = "256"
|
||||
CONTEXTWINDOW = "512"
|
||||
REPEATLASTN = "64"
|
||||
REPEATPENALTY = "1.3"
|
||||
NTHREADS = "7"
|
Loading…
Reference in New Issue
Block a user