mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-04 21:00:36 +08:00
fix(AbstractGraph): instantiation of Azure GPT models
Some checks failed
/ build (push) Has been cancelled
Some checks failed
/ build (push) Has been cancelled
Closes #498
This commit is contained in:
parent
3e07f6273f
commit
ade28fca2c
@ -185,6 +185,7 @@ graphviz==0.20.3
|
||||
# via scrapegraphai
|
||||
greenlet==3.0.3
|
||||
# via playwright
|
||||
# via sqlalchemy
|
||||
groq==0.9.0
|
||||
# via langchain-groq
|
||||
grpc-google-iam-v1==0.13.1
|
||||
|
||||
@ -133,6 +133,7 @@ graphviz==0.20.3
|
||||
# via scrapegraphai
|
||||
greenlet==3.0.3
|
||||
# via playwright
|
||||
# via sqlalchemy
|
||||
groq==0.9.0
|
||||
# via langchain-groq
|
||||
grpc-google-iam-v1==0.13.1
|
||||
|
||||
@ -23,3 +23,4 @@ semchunk>=1.0.1
|
||||
langchain-fireworks>=0.1.3
|
||||
langchain-community>=0.2.9
|
||||
langchain-huggingface>=0.0.3
|
||||
browserbase==0.3.0
|
||||
|
||||
@ -146,6 +146,10 @@ class AbstractGraph(ABC):
|
||||
llm_params["model"] = model_name
|
||||
return init_chat_model(**llm_params)
|
||||
|
||||
if "azure" in llm_params["model"]:
|
||||
model_name = llm_params["model"].split("/")[-1]
|
||||
return handle_model(model_name, "azure_openai", model_name)
|
||||
|
||||
if "gpt-" in llm_params["model"]:
|
||||
return handle_model(llm_params["model"], "openai", llm_params["model"])
|
||||
|
||||
@ -154,10 +158,6 @@ class AbstractGraph(ABC):
|
||||
token_key = llm_params["model"].split("/")[-1]
|
||||
return handle_model(model_name, "fireworks", token_key)
|
||||
|
||||
if "azure" in llm_params["model"]:
|
||||
model_name = llm_params["model"].split("/")[-1]
|
||||
return handle_model(model_name, "azure_openai", model_name)
|
||||
|
||||
if "gemini" in llm_params["model"]:
|
||||
model_name = llm_params["model"].split("/")[-1]
|
||||
return handle_model(model_name, "google_genai", model_name)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user