Update abstract_graph.py

Co-Authored-By: Matteo Vedovati <68272450+vedovati-matteo@users.noreply.github.com>
This commit is contained in:
Marco Vinciguerra 2024-08-11 19:19:17 +02:00
parent c77231c983
commit cef2fdb420

View File

@ -148,11 +148,7 @@ class AbstractGraph(ABC):
warnings.simplefilter("ignore")
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)
elif "fireworks" in llm_params["model"]:
if "fireworks" in llm_params["model"]:
model_name = "/".join(llm_params["model"].split("/")[1:])
token_key = llm_params["model"].split("/")[-1]
return handle_model(model_name, "fireworks", token_key)