forked from Clad3815/Twitch-Streamer-GPT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.env.example
181 lines (135 loc) · 7.45 KB
/
.env.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# This file contains all the configuration variables for the AI.
# You can copy this file to .env and change the values to your liking.
# ========================================
# =============== General ================
# ========================================
# The language of the AI (This is the default language of the AI, it's will be used when the AI can't detect the language itself)
AI_MAIN_LANGUAGE="Français"
# Streamer Gender
# This option is optionnal, but when it's set, it's will be used to help the AI to know the gender of the streamer to generate more accurate answers.
# If you don't want to set this option, you can leave it empty.
# Any gender is acceptable: Male, Female, Non-Binary, etc.
STREAMER_GENDER=""
# Enable debug mode (1 to activate, 0 to deactivate)
DEBUG_MODE=0
# The port used by the script to communicate between the different modules.
PORT_NUMBER=3048
# ========================================
# =========== Speaker + Micro ============
# ========================================
# The speaker device name to use to output the TTS.
SPEAKER_DEVICE="default"
# Use the "node-vad" voice activity detection (Better but not work on all system)
USE_NODE_VAD=0
# The detection level of the voice activation. (For node-vad)
# These contants can be used as the mode parameter of the VAD constructor to configure the VAD algorithm.
# Possible values are:
# - "NORMAL" (default) = Constant for normal voice detection mode. Suitable for high bitrate, low-noise data. May classify noise as voice, too. The default value if mode is omitted in the constructor.
# - "LOW_BITRATE" = Detection mode optimised for low-bitrate audio.
# - "AGGRESSIVE" = Detection mode best suited for somewhat noisy, lower quality audio.
# - "VERY_AGGRESSIVE" = Detection mode with lowest miss-rate. Works well for most inputs.
VOICE_ACTIVATION_MODE_LEVEL="NORMAL"
# ========================================
# =============== OpenAI =================
# ========================================
# Your OpenAI API Key
OPENAI_API_KEY="YOUR_API_KEY_HERE"
# OpenAI API base path
OPENAI_BASEPATH="https://api.openai.com/v1"
# OpenAI Model Configuration
# OPENAI_MODEL: Specifies the OpenAI model to use. By default, it's set to gpt-4.
# Options include:
# - "gpt-4": Offers advanced capabilities but is more expensive.
# - "gpt-4-32k": Provides more context from previous messages but is 10x as expensive as gpt-4.
# - "gpt-3.5-turbo": A less expensive option with good performance.
# - "gpt-3.5-turbo-16k": Provides more context from previous messages but is twice as expensive as gpt-3.5-turbo.
# Note: Switching to "gpt-3.5-turbo" or "gpt-3.5-turbo-16k" can help reduce costs.
OPENAI_MODEL="gpt-4"
# AUTO_USE_SMALL_MODEL: Enables automatic switching to a smaller model when possible.
# - If set to 1 and OPENAI_MODEL is "gpt-3.5-turbo-16k", the system will automatically switch to "gpt-3.5-turbo" if the token count is less than 4096.
# - If set to 1 and OPENAI_MODEL is "gpt-4-32k", the system will automatically switch to "gpt-4" if the token count is less than 8192.
# This setting allows for cost optimization based on the content size.
# Set to 1 to enable, or 0 to disable.
AUTO_USE_SMALL_MODEL=1
# OpenAI Completion Configuration
# This value will be sent inside the prompt of GPT to indicate that the AI should not generate text larger than this value.
# The AI will mostly never respect this value as it's not suited for mathematical operations but it's will help to have shorter answers.
OPENAI_MAX_CARACTERS_INSTRUCTIONS=250
# If the answer from GPT is larger than the max caracters (with a little margin), the text will be sent to the summarization module to be summarized to fit the max caracters.
OPENAI_REWRITE_LARGE_ANSWERS=1
# Maximum number of tokens to send to the API.
# The more tokens, the more expensive the operation will be.
# Set to 0 for model limit.
OPENAI_MAX_TOKENS_TOTAL=0
# Maximum number of tokens the API will return.
# A value between 150 and 300 is recommended. (300 is highly recommended to use the bot function like creating polls etc ...)
OPENAI_MAX_TOKENS_ANSWER=300
# Temperature of the model (0-1)
# The higher the value, the more random the answer will be.
# A value too high can result in incoherent answers.
OPENAI_MODEL_TEMP=0.7
# Frequency penalty of the model (0-1)
# This parameter is used to discourage the model from repeating the same words or phrases too frequently within the generated text.
# It is a value that is added to the log-probability of a token each time it occurs in the generated text.
# A higher frequency_penalty value will result in the model being more conservative in its use of repeated tokens.
OPENAI_MODEL_FREQ_PENALTY=0
# Presence penalty of the model (0-1)
# This parameter is used to encourage the model to include a diverse range of tokens in the generated text.
# It is a value that is subtracted from the log-probability of a token each time it is generated.
# A higher presence_penalty value will result in the model being more likely to generate tokens that have not yet been included in the generated text.
OPENAI_MODEL_PRESENCE_PENALTY=0
# ========================================
# ============= Porcupine =================
# ========================================
# Porcupine API Key. Porcupine is a wake word engine,
# you can use it to trigger the AI with a voice command
PORCUPINE_API_KEY="YOUR_API_KEY_HERE"
# ========================================
# ============ ElevenLabs =================
# ========================================
# Enable ElevenLabs API (1 to activate, 0 to deactivate)
# Useful for testing without using the API.
ELEVENLABS_ACTIVATED=1
# ElevenLabs API Key
ELEVENLABS_APIKEY="YOUR_API_KEY_HERE"
# Voice ID to use for the answer. You can find the list of voices at https://api.elevenlabs.io/v1/voices
ELEVENLABS_VOICEID="YOUR_VOICE_ID_HERE"
# Voice model to use for the answer.
ELEVENLABS_VOICE_MODEL="eleven_multilingual_v2"
# Configurations for voice stability and similarity.
# The higher the value, the more stable/similar the voice will be to the original voice.
# Default values are set to match ElevenLabs demo.
ELEVENLABS_VOICE_STABILITY=0.86
ELEVENLABS_VOICE_SIMILARITY_BOOST=0.75
# ========================================
# =============== Twitch ==================
# ========================================
# Twitch Broadcaster Account. This is necessary to trigger redemptions and other events.
# You can generate these tokens at https://twitchtokengenerator.com/
TWITCH_BROADCASTER_ACCESS_TOKEN=""
TWITCH_BROADCASTER_REFRESH_TOKEN=""
TWITCH_BROADCASTER_CLIEND_ID=""
# Twitch Bot Account. This account will be responsible for answering in the chat.
# It can be the same as the Broadcaster Account.
TWITCH_BOT_ACCESS_TOKEN=""
TWITCH_BOT_REFRESH_TOKEN=""
TWITCH_BOT_CLIEND_ID=""
TWITCH_BOT_USERNAME=""
# The channel the bot will join. This should be your channel.
TWITCH_CHANNEL_NAME=""
# Twitch Events Activation (1 to activate, 0 to deactivate)
ENABLE_TWITCH_ONSUB=1
ENABLE_TWITCH_ONRESUB=1
ENABLE_TWITCH_ONSUBGIFT=1
ENABLE_TWITCH_ONCOMMUNITYSUB=1
ENABLE_TWITCH_ONPRIMEPAIDUPGRADE=1
ENABLE_TWITCH_ONGIFTPAIDUPGRADE=1
ENABLE_TWITCH_ONBITS=1
ENABLE_TWITCH_ONREDEMPTION=1
ENABLE_TWITCH_ONHYPECHAT=1
# The minimum of bits to trigger the IA
TWITCH_MIN_BITS=100
## The redemption name in twitch to trigger the IA if enable (Case sensitive)
TWITCH_POINT_REDEMPTIONS_TRIGGER="Question pour l'IA"
# Read the messages from channel point redemptions with Google TTS (Free) (1 to activate, 0 to deactivate)
READ_CHANNEL_POINT_REDEMPTIONS=1