Open wangpengfei2048 opened 7 months ago
To use the prompt playground you have to at least enable one LLM provider. LLM providers are enabled through specific environment variables such as OPENAI_API_KEY
.
The easiest way to define it is to create a .env
file at the same level as your app file such as:
OPENAI_API_KEY="sk..."
If use the .env file , it is OK.
I use other way, it is OK, too. I set the uesr_env in the file 'chainlit-config.toml':
uesr_env=["OPENAI_API_KEY"] But I dont know why? I dont set the environment variables for OPENAI_API_KEY
That is weird. Either way you should not put secrets in the chainlit config as you might commit it to your repo.
All user use the same key, I set the key in the .env file
I get the following error when clicking on the "Inspect in prompt playground" icon. "Prompt Playground error: No LLM provider available"
If I set the .env file(include the OPENAI_API_KEY and OPENAI_API_BASE), there is no this problem.
but I what to set it with the config ? how the set the env? Is there some example?