Skip to content

Commit 6ce0406

Browse files
committed
chore: update .env.example for topic classification
1 parent be0ced3 commit 6ce0406

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.env.example

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,36 @@ NODE_ENV=production
44
ENABLE_NSFW_CLASSIFICATION=true
55
NSFW_DETECTOR_ENDPOINT=http://localhost:8082/predict
66
NSFW_DETECTOR_TOKEN=
7+
78
ENABLE_LANGUAGE_DETECTION=true
89
LANGUAGE_DETECTOR_ENDPOINT=http://localhost:5000/detect
910
LANGUAGE_DETECTOR_TOKEN=
1011
LANGUAGE_DETECTOR_TRUNCATE_LENGTH=350
12+
1113
ENABLE_HATE_SPEECH_DETECTION=true
1214
# (Required if ENABLE_HATE_SPEECH_DETECTION == true) set this to your own hate-speech-detector-api instance (https://github.com/atrifat/hate-speech-detector-api)
1315
HATE_SPEECH_DETECTOR_ENDPOINT=http://localhost:8083/predict
14-
# (Optional) set this to your own hate-speech-detector-api api_key if required
16+
# (Optional) set this to your own hate-speech-detector-api api_key if required
1517
HATE_SPEECH_DETECTOR_TOKEN=
1618
# (Default: 350) Set to 0 if you don't want to truncate text, or set to any positive number to truncate the text characters
1719
HATE_SPEECH_DETECTOR_TRUNCATE_LENGTH=350
20+
1821
ENABLE_SENTIMENT_ANALYSIS=true
1922
# (Required if ENABLE_SENTIMENT_ANALYSIS == true) set this to your own sentiment-analysis-api instance (https://github.com/atrifat/sentiment-analysis-api)
2023
SENTIMENT_ANALYSIS_ENDPOINT=http://localhost:8084/predict
21-
# (Optional) set this to your own sentiment-analysis-api api_key if required
24+
# (Optional) set this to your own sentiment-analysis-api api_key if required
2225
SENTIMENT_ANALYSIS_TOKEN=
2326
# (Default: 350) Set to 0 if you don't want to truncate text, or set to any positive number to truncate the text characters
2427
SENTIMENT_ANALYSIS_TRUNCATE_LENGTH=350
28+
29+
ENABLE_TOPIC_CLASSIFICATION=true
30+
# (Required if ENABLE_TOPIC_CLASSIFICATION == true) set this to your own topic-classification-api instance (https://github.com/atrifat/topic-classification-api)
31+
TOPIC_CLASSIFICATION_ENDPOINT=http://localhost:8085/predict
32+
# (Optional) set this to your own topic-classification-api api_key if required
33+
TOPIC_CLASSIFICATION_TOKEN=
34+
# (Default: 350) Set to 0 if you don't want to truncate text, or set to any positive number to truncate the text characters
35+
TOPIC_CLASSIFICATION_TRUNCATE_LENGTH=350
36+
2537
# (Required for classification filtering)
2638
NOSTR_MONITORING_BOT_PRIVATE_KEY=
2739
RELAYS_SOURCE=wss://relay.nostr.band,wss://relay.damus.io,wss://nos.lol,wss://relay.mostr.pub
@@ -40,23 +52,33 @@ WHITELISTED_PUBKEYS=
4052
LISTEN_PORT=7860
4153
# (Optional) Set true to enable forwarding of request headers to upstream server, useful if relays behind reverse proxy
4254
ENABLE_FORWARD_REQ_HEADERS=false
55+
4356
# (Optional. Default: sfw. Options: all, sfw, partialsfw, and nsfw) Filter hate speech (toxic comment).
4457
DEFAULT_FILTER_CONTENT_MODE=sfw
4558
# (Optional. Default: 75, Options: 0-100) Default minimum probability/confidence score to determine the classification of nsfw content
4659
DEFAULT_FILTER_NSFW_CONFIDENCE=75
60+
4761
# (Optional. Default: all. Multiple Options: all, or other language code)
4862
DEFAULT_FILTER_LANGUAGE_MODE=all
4963
# (Optional. Default: 15. Options: 0-100) Default minimum probability/confidence score to determine the classification of language
5064
DEFAULT_FILTER_LANGUAGE_CONFIDENCE=15
65+
5166
# (Optional. Default: no. Options: all, no, yes) Filter hate speech (toxic comment). "all" will disable filtering, "no" will filter out any detected hate speech content, "yes" will select only detected hate speech content
5267
DEFAULT_FILTER_HATE_SPEECH_TOXIC_MODE=no
5368
# (Optional. Default: 75. Options: 0-100) Default minimum probability/confidence score to determine the classification of hate speech (toxic comment)
5469
DEFAULT_FILTER_HATE_SPEECH_TOXIC_CONFIDENCE=75
5570
# (Optional. Default: max. Options: max, sum) Methods to determine toxic content by using max value from all toxic classes score or sum value of all toxic classes score
5671
DEFAULT_FILTER_HATE_SPEECH_TOXIC_EVALUATION_MODE=max
72+
5773
# (Optional. Default: all, Multiple Options: all,negative,neutral,positive) Multiple options separated by comma (eg: neutral,positive => filter to get both neutral and positive sentiment)
5874
DEFAULT_FILTER_SENTIMENT_MODE=all
5975
# (Optional. Default: 35, Options: 0-100) Default minimum probability/confidence score in percentage to determine the classification of sentiment
6076
DEFAULT_FILTER_SENTIMENT_CONFIDENCE=35
77+
78+
# (Default: all, Multiple Options: list of valid topic in atrifat/nostr-filter-relay Github) Multiple options separated by comma (eg: life,music,sport,science_and_technology => filter to get life (short version of: diaries_and_life), music, sport, science_and_technology)
79+
DEFAULT_FILTER_TOPIC_MODE=all
80+
# (Default: 35, Options: 0-100) Default minimum probability/confidence score in percentage to determine the classification of topic
81+
DEFAULT_FILTER_TOPIC_CONFIDENCE=35
82+
6183
# (Optional. Default: all. Options: all, nostr, activitypub) Filter user type. "nostr" for native nostr users and "activitypub" for activitypub users coming from bridge
62-
DEFAULT_FILTER_USER_MODE=all
84+
DEFAULT_FILTER_USER_MODE=all

0 commit comments

Comments
 (0)