iryna-kondr / scikit-llm

Seamlessly integrate LLMs into scikit-learn.
https://beastbyte.ai/
MIT License
2.98k stars 235 forks source link

Documentation: #67

Closed Sicolas-Flamel closed 9 months ago

Sicolas-Flamel commented 9 months ago

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'))

OKUA1 commented 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.

Sicolas-Flamel commented 9 months ago

OK