forked from ai-dev-passion/whatsapp-api-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.env-example
105 lines (82 loc) · 4.24 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
# ----------------------------------------------- #
# Make a copy of this file and rename it to .env #
# #
# Also check out our documentation: #
# https://askrella.github.io/whatsapp-chatgpt #
# ----------------------------------------------- #
# Get your key here: https://platform.openai.com/account/api-keys
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# HuggingFace API Token https://huggingface.co/settings/tokens
HUGGINGFACE_API_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# In case you run into ratelimit on a single organization token, you might setting up multiple API keys here
# Example:
# OPENAI_API_KEYS=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# GPT Model (default: gpt-3.5-turbo)
OPENAI_GPT_MODEL=
# Max tokens to use for GPT per request
MAX_MODEL_TOKENS=2000
# GPT Pre Prompt, executed after creating a conversation
# Example: Act very funny and overreact to messages. Do that for every message you get, forever.
PRE_PROMPT=
# Whether or not to use prefixes !gpt and !dalle
PREFIX_ENABLED=true
# Whether or not to use prefixes for self-note conversation
PREFIX_SKIPPED_FOR_ME=true
# Set own prefixes for ChatGPT, DALL-E, reset context, configuration
GPT_PREFIX=!gpt
DALLE_PREFIX=!dalle
RESET_PREFIX=!reset
AI_CONFIG_PREFIX=!config
# Whether or not to allow the bot interacting on groupchats
GROUPCHATS_ENABLED=false
# Prompt Moderation
# If enabled, the bot will check any prompts submitted by users with the OpenAI Moderation API
# If the prompt is classified as any of the categories in the blacklisted categories, the prompt will be rejected
# You can find the available categories here: https://beta.openai.com/docs/api-reference/moderations
PROMPT_MODERATION_ENABLED = true
PROMPT_MODERATION_BLACKLISTED_CATEGORIES = ["hate", "hate/threatening", "self-harm", "sexual", "sexual/minors", "violence", "violence/graphic"]
# Access control, only allow whatsapp-chatgpt to react to specific phone numbers, comma-separated
WHITELISTED_PHONE_NUMBERS=
WHITELISTED_ENABLED=false
# Speech API URL
# You can use host your own Speech API
# https://github.com/askrella/speech-rest-api
SPEECH_API_URL=
# Whisper API
# API Key
WHISPER_API_KEY=
# You can use Whisper API for voice transcription
WHISPER_API_URL=https://transcribe.whisperapi.com
# Defines if the bot should recognize and transcribe your voice messages
TRANSCRIPTION_ENABLED=false
# Defines if the bot should use the local or remote transcription service
# "local" = You need to have "whisper" installed on your machine
# "openai" = It will use Open AI's transcription API with whisper-1 model
# "speech-api" = It will use our Speech API to transcribe your voice messages
# "whisper-api" = It will use whisper's API to transcribe your voice messages
TRANSCRIPTION_MODE=local
# Define the language of transcription, depends on transcriber it might auto-detect if not given
TRANSCRIPTION_LANGUAGE=
# Defines if the bot should send voice message responses (text-to-speech)
# Be aware that this feature will use the Speech API to convert the GPT response to voice
# It's open source: https://github.com/askrella/speech-rest-api
TTS_ENABLED=false
# Defines if the bot should return the TTS response as a text message too
# If enabled, the bot will send the text response and the voice message
TTS_TRANSCRIPTION_RESPONSE_ENABLED=true
# Defines if the bot should use the Speech API or AWS Polly to convert text to speech
# "speech-api" = It will use our Speech API to transcribe your voice messages
# "aws-polly" = It will use AWS Polly to convert text to speech
TTS_MODE=speech-api
# AWS Config
# You can use AWS Polly to convert text to speech
# You need to have an AWS account and create an IAM user with Polly permissions
# You can find the available voices here: https://docs.aws.amazon.com/polly/latest/dg/voicelist.html
# For the Voice Engine, you can use "standard" or "neural", make sure to use the correct voice for the engine
AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AWS_REGION=eu-central-1
AWS_POLLY_VOICE_ID=Joanna
AWS_POLLY_VOICE_ENGINE=standard
# LangChain Tool Config https://js.langchain.com/docs/modules/agents/tools/
SERPAPI_API_KEY=xxxxxxxxx