Closed Sicolas-Flamel closed 9 months ago
Hi @Sicolas-Flamel,
I don't think that this is worth including into the documentation. Users should decide for themselves where exactly they want to get the keys from (be it an env variable or anything else).
On the other hand, it is also possible to set the env variable SKLLM_CONFIG_OPENAI_KEY
directly (without even using the SKLLMConfig
class), and this is something we should probably mention.
OK
Documentation:
It may be better if we set the Open API via environment variables.
from skllm.config import SKLLMConfig from dotenv import load_dotenv, find_dotenv import os
_ = load_dotenv(find_dotenv())
SKLLMConfig.set_openai_key(os.getenv('OPENAI_API_KEY'))