Fix: Azure OpenAI issue

This commit is contained in:
aziz-ullah-khan 2024-08-21 16:18:51 +05:00
parent 1b488715e6
commit a92b9c6970

View File

@ -153,6 +153,10 @@ class AbstractGraph(ABC):
raise ValueError(f"Model '{llm_params['model']}' is not supported")
try:
if "azure" in llm_params["model"]:
model_name = llm_params["model"].split("/")[-1]
return handle_model(model_name, "azure_openai", model_name)
if "fireworks" in llm_params["model"]:
model_name = "/".join(llm_params["model"].split("/")[1:])
token_key = llm_params["model"].split("/")[-1]
@ -271,4 +275,4 @@ class AbstractGraph(ABC):
def run(self) -> str:
"""
Abstract method to execute the graph and return the result.
"""
"""