Add ability to override local classification model

This commit is contained in:
Cohee
2023-09-11 01:25:22 +03:00
parent 5cc6a2dca6
commit c76c76410c
2 changed files with 55 additions and 21 deletions

View File

@ -15,7 +15,15 @@ const skipContentCheck = false; // If true, no new default content will be deliv
// 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;
// Additional settings for extra modules / extensions
const extras = {
// Text classification model for sentiment analysis. HuggingFace ID of a model in ONNX format.
classificationModel: 'Cohee/distilbert-base-uncased-go-emotions-onnx',
};
// Request overrides for additional headers
// Format is an array of objects:
// { hosts: [ "<url>" ], headers: { <header>: "<value>" } }
const requestOverrides = [];
module.exports = {
@ -32,4 +40,5 @@ module.exports = {
securityOverride,
skipContentCheck,
requestOverrides,
extras,
};