2023-07-20 19:32:15 +02:00
const port = 8000;
const whitelist = ['127.0.0.1']; //Example for add several IP in whitelist: ['127.0.0.1', '192.168.0.10']
const whitelistMode = true; //Disabling enabling the ip whitelist mode. true/false
const basicAuthMode = false; //Toggle basic authentication for endpoints.
const basicAuthUser = {username: "user", password: "password"}; //Login credentials when basicAuthMode is true.
const disableThumbnails = false; //Disables the generation of thumbnails, opting to use the raw images instead
const autorun = true; //Autorun in the browser. true/false
const enableExtensions = true; //Enables support for TavernAI-extras project
const listen = true; // If true, Can be access from other device or PC. otherwise can be access only from hosting machine.
const allowKeysExposure = false; // If true, private API keys could be fetched to the frontend.
2023-07-21 14:28:32 +02:00
const skipContentCheck = false; // If true, no new default content will be delivered to you.
2023-09-16 20:53:30 +02:00
const thumbnailsQuality = 95; // Quality of thumbnails. 0-100
2023-10-24 21:09:55 +02:00
const disableChatBackup = false; // Disables the backup of chat logs to the /backups folder
2023-07-20 19:32:15 +02:00
// If true, Allows insecure settings for listen, whitelist, and authentication.
// Change this setting only on "trusted networks". Do not change this value unless you are aware of the issues that can arise from changing this setting and configuring a insecure setting.
const securityOverride = false;
2023-09-11 00:25:22 +02:00
// Additional settings for extra modules / extensions
const extras = {
2023-09-14 22:40:13 +02:00
// Disables auto-download of models from the HuggingFace Hub.
// You will need to manually download the models and put them into the /cache folder.
disableAutoDownload: false,
2023-09-11 00:25:22 +02:00
// Text classification model for sentiment analysis. HuggingFace ID of a model in ONNX format.
classificationModel: 'Cohee/distilbert-base-uncased-go-emotions-onnx',
2023-09-11 23:15:21 +02:00
// Image captioning model. HuggingFace ID of a model in ONNX format.
captioningModel: 'Xenova/vit-gpt2-image-captioning',
2023-09-14 22:12:33 +02:00
// Feature extraction model. HuggingFace ID of a model in ONNX format.
2023-09-14 22:40:13 +02:00
embeddingModel: 'Xenova/all-mpnet-base-v2',
2023-10-20 14:03:26 +02:00
// GPT-2 text generation model. HuggingFace ID of a model in ONNX format.
promptExpansionModel: 'Cohee/fooocus_expansion-onnx',
2023-09-11 00:25:22 +02:00
};
2023-08-31 06:09:31 +02:00
// Request overrides for additional headers
2023-09-11 00:25:22 +02:00
// Format is an array of objects:
// { hosts: [ "<url>" ], headers: { <header>: "<value>" } }
2023-08-31 06:09:31 +02:00
const requestOverrides = [];
2023-07-20 19:32:15 +02:00
module.exports = {
2023-08-31 06:43:45 +02:00
port,
whitelist,
whitelistMode,
basicAuthMode,
basicAuthUser,
autorun,
enableExtensions,
listen,
disableThumbnails,
allowKeysExposure,
securityOverride,
skipContentCheck,
requestOverrides,
2023-09-16 20:53:30 +02:00
thumbnailsQuality,
2023-09-11 00:25:22 +02:00
extras,
2023-10-24 21:09:55 +02:00
disableChatBackup,
2023-07-20 19:32:15 +02:00
};