Skip to content

Commit de20f30

Browse files
authored
Merge pull request #474 from DragonelRoland/main
Update smart_scraper_openai.py
2 parents a91807a + 0b15393 commit de20f30

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/openai/smart_scraper_openai.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import os, json
66
from scrapegraphai.graphs import SmartScraperGraph
77
from scrapegraphai.utils import prettify_exec_info
8-
8+
from dotenv import load_dotenv
9+
load_dotenv()
910

1011
# ************************************************
1112
# Define the configuration for the graph
@@ -14,7 +15,7 @@
1415

1516
graph_config = {
1617
"llm": {
17-
"api_key": "s",
18+
"api_key": os.getenv("OPENAI_API_KEY"),
1819
"model": "gpt-3.5-turbo",
1920
},
2021
"verbose": True,

0 commit comments

Comments
 (0)