Merge pull request #571 from aziz-ullah-khan/pre/beta

Fix: Azure OpenAI issue
This commit is contained in:
Marco Vinciguerra 2024-08-21 13:37:26 +02:00 committed by GitHub
commit 117fca0b60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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.
"""
"""