Problems with connecting to chatGPT #114
-
It is my understanding that to connect to chatGPT there's a cookie option and an APIoption. I have created an OPEN_AI key and exported it to the environment. Per the documentation, I tried pentestgpt -connection to test the connection. I then tried pentestgpt -connection --useAPI and received the same two errors. Why is it complaining that CHATGPT_COOKIE is not set when I have specified --useAPI ? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Did you run |
Beta Was this translation helpful? Give feedback.
-
Yes, I ran pentestgpt-connection first and received these error messages:
##### Test Connection for OpenAI api (GPT-4)
The OpenAI API key is not properly configured. Please follow the README to update OpenAI API key in config/chatgpt_config.py
##### Test Connection for OpenAI api (GPT-3.5)
The OpenAI API key is not properly configured. Please follow the README to update OpenAI API key in config/chatgpt_config.py
Before running pentestgpt-connection,
I have:
1. EXPORTed my API Key to OPENAI_KEY
2. I entered my API Key in config/chatgpt_config.py
* (Note: the README.md does not specify this is required. However the error above says this is required)
I have NOT done anything with cookie.
Please advise.
From: Gelei Deng ***@***.***>
Sent: Monday, June 12, 2023 9:41 PM
To: GreyDGL/PentestGPT ***@***.***>
Cc: wardellcastles ***@***.***>; Author ***@***.***>
Subject: Re: [GreyDGL/PentestGPT] Problems with connecting to chatGPT (Discussion #114)
Did you run pentestgpt-connection first?
-
Reply to this email directly, view it on GitHub<#114 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHSQHL7A6JYNSIE2DOLWOLLXK7AJDANCNFSM6AAAAAAZEAFXZU>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Yes, I have GPT Plus paying the $20 USD/month.
I have successfully verified my API key via the Python code suggested here: https://platform.openai.com/docs/api-reference/authentication
Perhaps I am not in the current version of pentestGPT? There was some initial confusion on the installation. How do I check the version number?
Thanks..
From: Gelei Deng ***@***.***>
Sent: Tuesday, June 13, 2023 10:14 AM
To: GreyDGL/PentestGPT ***@***.***>
Cc: wardellcastles ***@***.***>; Author ***@***.***>
Subject: Re: [GreyDGL/PentestGPT] Problems with connecting to chatGPT (Discussion #114)
You don't need to update config/chatgpt_config.py.
May I confirm if you have linked a payment method to OpenAI? Have you ever tested that your OpenAI key is working?
-
Reply to this email directly, view it on GitHub<#114 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHSQHLZNBKRMVJQLRIWUISLXLBYTZANCNFSM6AAAAAAZEAFXZU>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Yes, I have shown that my API_KEY works. I did this by running this Python script I noted that while many models were listed, GPT-4 and GPT-3 models were NOT listed. There were no GPT-4 models. There were several GPT-3.5 type models, i.e. gpt-3.5-turbo-0613, etc. To start over fresh, I did a pip uninstall of PentestGPT. Screen shot is below also showing that OPENAI_KEY is set in the environment |
Beta Was this translation helpful? Give feedback.
-
Problem solved. Learn something every day. Now I have a paid API account. I would love to contribute to the development of PentestGPT! I am an "OK" Python developer, not the best. If you can suggest an improvement I can look into, I'd try to work on it! |
Beta Was this translation helpful? Give feedback.
Could you please send a sample request through your OPENAI_API? I guess that you did not link your payment method to OpenAI, but only subscribed for GPT-plus. In this case, your OpenAI key is not activated. You may try with this:
If your key is valid, you should see a sample response.