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
At the moment, there are two scripts that launch the server (server.sh) and the user interface (sandbox.sh). Both scripts share a number of environment variables, that the user might have to modify in both places, should any of the configuration parameters change. Also they are the place where some other variables have to be added, like the OPENAI_API_KEY, which should remain secret and never be committed into the repository.
I would suggest to create two other scripts just for setting the environment. The first one could be called shared_conf.sh and would contain all the configuration variables that can be public. The second one could be called secret_conf.sh and contain the environment variables that are to keep private.
Both scrips (server.sh and sandbox.sh) will source shared_conf.sh at the beginning and conditionally source secret_conf.sh if it exists.
[[ -f secret_conf.sh ]] &&source secret_conf.sh
Additionally, secret_conf.sh can be included in .gitignore so team members won't commit their secret credentials by accident to the repository.
The text was updated successfully, but these errors were encountered:
Thanks @jdortiz; some comments:
Generally, IMO, we should avoid supporting or providing examples of using custom wrappers to bootstrap settings. While using environment vars, and thus including them in a wrapper is provided... it is not the ideal (or documented) way to bootstrap the environment outside of K8s. It would be up to the user to write, protect, and support a wrapper. IMO, the documented feature to export/import settings is the only method that should be supported for custom bootstrapping.
Documented examples of starting the AI Explorer using wrapper scripts should be replaced with examples of creating a settings json file for consumption; the only place I know where examples are provided are in the HOL and will be addressed in Move HOL to LL #121
#35 will address the automatic consuption of existing settings to discourage wrapper use.
I'm going to close this and address the points raised in #35 and #121; feel free to re-open if the comments do not satisfy the request. FYI @corradodebari
At the moment, there are two scripts that launch the server (
server.sh
) and the user interface (sandbox.sh
). Both scripts share a number of environment variables, that the user might have to modify in both places, should any of the configuration parameters change. Also they are the place where some other variables have to be added, like theOPENAI_API_KEY
, which should remain secret and never be committed into the repository.I would suggest to create two other scripts just for setting the environment. The first one could be called
shared_conf.sh
and would contain all the configuration variables that can be public. The second one could be calledsecret_conf.sh
and contain the environment variables that are to keep private.Both scrips (
server.sh
andsandbox.sh
) willsource shared_conf.sh
at the beginning and conditionally sourcesecret_conf.sh
if it exists.Additionally,
secret_conf.sh
can be included in.gitignore
so team members won't commit their secret credentials by accident to the repository.The text was updated successfully, but these errors were encountered: