From 0b1539341cfabe2d620bd0805643fa6fb9629263 Mon Sep 17 00:00:00 2001 From: DragonelRoland <127917933+DragonelRoland@users.noreply.github.com> Date: Sat, 20 Jul 2024 14:25:48 +0200 Subject: [PATCH] Update smart_scraper_openai.py --- examples/openai/smart_scraper_openai.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/openai/smart_scraper_openai.py b/examples/openai/smart_scraper_openai.py index 513a9b03..b0515770 100644 --- a/examples/openai/smart_scraper_openai.py +++ b/examples/openai/smart_scraper_openai.py @@ -5,7 +5,8 @@ Basic example of scraping pipeline using SmartScraper import os, json from scrapegraphai.graphs import SmartScraperGraph from scrapegraphai.utils import prettify_exec_info - +from dotenv import load_dotenv +load_dotenv() # ************************************************ # Define the configuration for the graph @@ -14,7 +15,7 @@ from scrapegraphai.utils import prettify_exec_info graph_config = { "llm": { - "api_key": "s", + "api_key": os.getenv("OPENAI_API_KEY"), "model": "gpt-3.5-turbo", }, "verbose": True,