Using Environment Variable in .env file to run a test container #3308
Unanswered
RyanKellyReply
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Try copying |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Perhaps a very basic question, my programming skills are basic. I am trying to deploy a test container for Librechat using a env variable in my .env file where i expose the open ai API key at runtime rather than exposing my API key itself in the codebase.
In the .env file I am first declaring the environment variable with an empty value OPEN_AI_KEY=
Later on in the .env file, I am setting the value where i normally insert my open ai key as such OPENAI_API_KEY=${OPEN_AI_KEY} which sets it to the value of the environment variable above where i will pass the actual value at runtime
When I go to run the test container in desktop I am declaring the variable OPEN_AI_KEY= myvalue but I am getting the following error TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
so its expecting a string but getting undefined which must mean i am not declaring it properly. Do i need to change any other files to get this working such as the crpyto.js file?
Any help or best practice would be much appreciated
Beta Was this translation helpful? Give feedback.
All reactions