KeyError: 'DEFAULT_MODEL'
TRexAILab opened this issue · comments
superuser99 commented
Hello! Please help, when you start the bot with the python -m src.main
command, this message appears.
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/gpt-discord-bot/src/main.py", line 8, in <module>
from src.constants import (
File "/home/gpt-discord-bot/src/constants.py", line 25, in <module>
DEFAULT_MODEL = os.environ["DEFAULT_MODEL"]
File "/usr/lib/python3.10/os.py", line 680, in __getitem__
raise KeyError(key) from None
KeyError: 'DEFAULT_MODEL'
daefea commented
This is a simple fix. In the .env file update
MODEL=gpt-3.5-turbo
to
DEFAULT_MODEL=gpt-3.5-turbo
roflcakesII commented
This is a simple fix. In the .env file update MODEL=gpt-3.5-turbo to DEFAULT_MODEL=gpt-3.5-turbo
this hasnt solved this issue for me, it still throws the error original poster had
Kaveen Kumarasinghe commented
Hi @roflcakesII can you share what your .env looks like with the sensitive tokens removed?