Skip to content

Python scraper based on AI

Update abstract_graph.py

shubihud8d5cd267ae8
diff --git a/scrapegraphai/graphs/abstract_graph.py b/scrapegraphai/graphs/abstract_graph.py
index b5f3a681..87a00f9b 100644
--- a/scrapegraphai/graphs/abstract_graph.py
+++ b/scrapegraphai/graphs/abstract_graph.py
@@ -298,7 +298,7 @@ class AbstractGraph(ABC):
google_api_key=llm_config["api_key"], model="models/embedding-001"
)
if isinstance(self.llm_model, OpenAI):
- return OpenAIEmbeddings(api_key=self.llm_model.openai_api_key)
+ return OpenAIEmbeddings(api_key=self.llm_model.openai_api_key, base_url=self.llm_model.openai_api_base)
elif isinstance(self.llm_model, DeepSeek):
return OpenAIEmbeddings(api_key=self.llm_model.openai_api_key)
elif isinstance(self.llm_model, AzureOpenAIEmbeddings):
@@ -407,4 +407,4 @@ class AbstractGraph(ABC):
"""
Abstract method to execute the graph and return the result.
"""
- pass
\ No newline at end of file
+ pass