Skip to content

Commit 117fca0

Browse files
authored
Merge pull request #571 from aziz-ullah-khan/pre/beta
Fix: Azure OpenAI issue
2 parents 1b48871 + a92b9c6 commit 117fca0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scrapegraphai/graphs/abstract_graph.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ def handle_model(model_name, provider, token_key, default_token=8192):
153153
raise ValueError(f"Model '{llm_params['model']}' is not supported")
154154

155155
try:
156+
if "azure" in llm_params["model"]:
157+
model_name = llm_params["model"].split("/")[-1]
158+
return handle_model(model_name, "azure_openai", model_name)
159+
156160
if "fireworks" in llm_params["model"]:
157161
model_name = "/".join(llm_params["model"].split("/")[1:])
158162
token_key = llm_params["model"].split("/")[-1]
@@ -271,4 +275,4 @@ def _create_graph(self):
271275
def run(self) -> str:
272276
"""
273277
Abstract method to execute the graph and return the result.
274-
"""
278+
"""

0 commit comments

Comments
 (0)