Skip to content

Commit d8d5cd2

Browse files
authored
Update abstract_graph.py
fix: Incorrect API Key Error with OpenAI Proxy
1 parent 44fbd71 commit d8d5cd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scrapegraphai/graphs/abstract_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def _create_default_embedder(self, llm_config=None) -> object:
298298
google_api_key=llm_config["api_key"], model="models/embedding-001"
299299
)
300300
if isinstance(self.llm_model, OpenAI):
301-
return OpenAIEmbeddings(api_key=self.llm_model.openai_api_key)
301+
return OpenAIEmbeddings(api_key=self.llm_model.openai_api_key, base_url=self.llm_model.openai_api_base)
302302
elif isinstance(self.llm_model, DeepSeek):
303303
return OpenAIEmbeddings(api_key=self.llm_model.openai_api_key)
304304
elif isinstance(self.llm_model, AzureOpenAIEmbeddings):
@@ -407,4 +407,4 @@ def run(self) -> str:
407407
"""
408408
Abstract method to execute the graph and return the result.
409409
"""
410-
pass
410+
pass

0 commit comments

Comments
 (0)