Closed KawniX closed 8 months ago
@KawniX This is supported. You just need to translate the configuration key to upper case and "." to "_". For example, llm.api_base is translated to LLM_API_BASE.
Is this documented? Can you be more specific with the example? Is it like this?:
{ "llm.api_key": LLM_API_BASE, "llm.model": "gpt-3.5-turbo-0125", "session.max_internal_chat_round_num": "20", "code_generator.enable_auto_plugin_selection": "true" }
What about when we want to use the UI? How do we set the env variable there? Or just having a secret env variable enough for it to work?
Not documented yet. But this is supported. I mean if you want to configure an environment variable, you should have the key as LLM_API_BASE for llm.api_key. The environment variables will then overwrite any corresponding keys in the config file.
For your example case, you just configure 4 env variables:
LLM_API_KEY=xxx LLM_MODEL=xxx ...
That's it.
Is it possible to set the API Key through .env file instead rather than through the /Project config.json?
Would like to know how I can do this even if I have to edit the src code itself. Thank you!