dev-gpt
dev-gpt copied to clipboard
Unable to set keys
➜ dev-gpt configure --openai-api-key sk-xxxx
Traceback (most recent call last):
File "/opt/homebrew/bin/dev-gpt", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/dev_gpt/cli.py", line 103, in configure
set_api_key('OPENAI_API_KEY', openai_api_key)
File "/opt/homebrew/lib/python3.10/site-packages/dev_gpt/options/configure/key_handling.py", line 107, in set_api_key
if f"{name}" in os.environ or is_key_set_in_config_file(key):
TypeError: is_key_set_in_config_file() missing 1 required positional argument: 'key'
if you want to fix this problem you should add this function, in the image i fix the problem locally in my machine
file: dev_gpt/options/configure/key_handling.py line: 107
i think the name
if f"{name}" in os.environ or is_key_set_in_config_file(name, key):
then you can run python main.py configure --openai-api-key "your key"
but I'm running locally without installing it on pip
to run local you need do to this
pip install -r requirements.txt
so you can run with python
python main.py --help
will show you the commands