mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-12 21:01:56 +08:00
Update abstract_graph.py
fix: Incorrect API Key Error with OpenAI Proxy
This commit is contained in:
parent
44fbd71742
commit
d8d5cd267a
@ -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
|
||||
pass
|
||||
|
||||
Loading…
Reference in New Issue
Block a user