Hamid Shojanazeri преди 1 година
родител
ревизия
2580bb14a6
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  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