You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid hardcoded secrets name when checking OpenAI API Key #195
This improvement should be good, because somehow the bot commented on the pull request indicating that I did not set OPENAI_API_KEY secrets variable (indeed I did not set it up, instead I set up the other variable). The PR can be seen on this link: stefanusgusega/sepotifai-retriever#2
I'm sorry, I think I probably misunderstood the code. So, the flow is: return Chat using process.env.OPENAI_API_KEY if any --> if not set, get OPENAI_API_KEY manually. Is it right?
@stefanusgusega yes. your understanding is correct, if OPENAI_API_KEY existing in ENV, then use it. if not, then trying to retrieve it from github variables
if you are using github bot, it can only access the OPENAI_API_KEY in variables, so it raised the error. either you deploy the bot yourself with OPENAI_API_KEY env var or you have set OPENAI_API_KEY in variables, it should work
Activity
stefanusgusega commentedon Sep 20, 2025
I'm sorry, I think I probably misunderstood the code. So, the flow is: return
Chatusingprocess.env.OPENAI_API_KEYif any --> if not set, getOPENAI_API_KEYmanually. Is it right?anc95 commentedon Sep 22, 2025
@stefanusgusega yes. your understanding is correct, if OPENAI_API_KEY existing in ENV, then use it. if not, then trying to retrieve it from github variables
stefanusgusega commentedon Sep 23, 2025
Okay, but in my following PR (stefanusgusega/sepotifai-retriever#2), I have set
OPENAI_API_KEYon myENV(https://github.com/stefanusgusega/sepotifai-retriever/blob/master/.github/workflows/review-bot.yml#L27), but I still get the message that I do not set the OpenAI API Key. Is it expecetd?anc95 commentedon Sep 23, 2025
the github action looks working.
yes, it's expected.
if you are using github bot, it can only access the OPENAI_API_KEY in variables, so it raised the error. either you deploy the bot yourself with OPENAI_API_KEY env var or you have set OPENAI_API_KEY in variables, it should work