Explorar el Código

adding octoAI api key

Hamid Shojanazeri hace 1 año
padre
commit
2580bb14a6
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      tutorials/chatbot/data_pipelines/config.py

+ 2 - 3
tutorials/chatbot/data_pipelines/config.py

@@ -4,12 +4,11 @@
 import yaml
 import os
 
-
 def load_config():
     # Read the YAML configuration file
     file_path = "./config.yaml"
     with open(file_path, "r") as file:
         config = yaml.safe_load(file)
-
-    config["api_key"] = os.getenv('OPENAI_API_KEY')
+    # Set the API key from the environment variable
+    config["api_key"] = os.environ["OCTOAI_API_TOKEN"]
     return config