Closed ciocoiua closed 3 months ago
Try punching that same key into the online demo. If it doesn't work, it's the key. If it does, the local setup has issues.
Godspeed, young Jedi...
-jjg
On Thu, Jun 13, 2024 at 4:32 AM Silviu Ciocoiu @.***> wrote:
I'm trying to run AutoGroq with OpenAi but even if I add the key to config_local.py or even to config.py directly I still get.
Request failed. Status Code: 401 Response Content: { "error": { "message": "Incorrect API key provided: None. You can find your API key at https://platform.openai.com/account/api-keys.", "type": "invalid_request_error", "param": null, "code": "invalid_api_key" } }
Debug: Rephrased text: None Error: Failed to rephrase the user request. 2024-06-13 12:29:09.016 Please replace st.experimental_rerun with st.rerun .
st.experimental_rerun will be removed after 2024-04-01.
Am i doing something wrong or can you replicate this behavior?
— Reply to this email directly, view it on GitHub https://github.com/jgravelle/AutoGroq/issues/48, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ6GXH6P53P4CEVJEOHGXTZHFRJ5AVCNFSM6AAAAABJIAC67KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TANRVHEYTAOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Does the demo have OpenAPI as an option? Also it says on the left "NOTE: GPT models can only be used locally, not in the online demo." :(
I tested the key using another project and it seems to be okay. Also the message seems to be incorrect API key provided: None. Like even if I add it in the config files at OPENAI_API_KEY = " ..." it's not being read/used.
Any tips on how to debug further ? 🥺
You might find this forum helpful: https://discord.gg/DXjFPX84gs
Also, make sure "openai" is your selected provider...
Thanks! Read the forum and noticed a discussion about openai_provider.py. In the file I saw the key being picked up from os.environ.get("OPENAI_API_KEY") and not the config files. Fixed my issue by adding the OPENAI_API_KEY to windows environment variables.
I'm trying to run AutoGroq with OpenAi but even if I add the key to config_local.py or even to config.py directly I still get.
Request failed. Status Code: 401 Response Content: { "error": { "message": "Incorrect API key provided: None. You can find your API key at https://platform.openai.com/account/api-keys.", "type": "invalid_request_error", "param": null, "code": "invalid_api_key" } }
Debug: Rephrased text: None Error: Failed to rephrase the user request. 2024-06-13 12:29:09.016 Please replace
st.experimental_rerun
withst.rerun
.st.experimental_rerun
will be removed after 2024-04-01.Am i doing something wrong or can you replicate this behavior?