-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traceback errors and KeyError #85
Comments
I'm getting the same error. Did you find out what was wrong? |
I solved the problem with KeyError: 'OPENAI_API_KEY' mentioned above by adding the API key directly to main_no_modal.py on line 26: openai.api_key = "paste here your api key" next solution of the same problem could be also to install python-dotenv: pip install python-dotenv Anyway then I am getting another error in the main_no_modal.py: Note: The user may choose to name the files differently or store them in a different directory. Any help will be appreciated. By the way I am using the python virtual environments instead of modal. All the modules from requirements.txt were installed. In the end I assigned to modal and then looks the smol-ai works ok. But with modal I get many errors when trying to run with GPT-4 API. Command used: Traceback (most recent call last): When running without gpt-4 parameter then the smol-ai succeed. Thanks in advance for help. |
Hi guys! I'm still very new to coding, so please be patient with me. I followed all of the instructions to run Smol-ai and put my api key from openai into the area: OPENAI_API_KEY=
After prompting Smol-ai It tells me:
hi its me, 🐣the smol developer🐣! you said you wanted: "My_Prompt" in text
But then I get the following errors
Traceback (most recent call last):
File "C:\A.I\Smol Ai Developer\developer\main_no_modal.py", line 230, in
main(prompt, directory, file)
File "C:\A.I\Smol Ai Developer\developer\main_no_modal.py", line 121, in main
filepaths_string = generate_response(
File "C:\A.I\Smol Ai Developer\developer\main_no_modal.py", line 26, in generate_response
openai.api_key = os.environ["OPENAI_API_KEY"]
File "C:\Users\Zove\AppData\Local\Programs\Python\Python310\lib\os.py", line 680, in getitem
raise KeyError(key) from None
KeyError: 'OPENAI_API_KEY'
I signed up for Modal but am still on the waitlist. So I'm using the: python main_no_modal.py " " --model=gpt-4
I also have access to gpt-4 through the paid subscription as well
Any help would be appreciated and thanks!! :D
The text was updated successfully, but these errors were encountered: