From 7a0460ce112ae1fe783dd100b4d32e56c282919f Mon Sep 17 00:00:00 2001 From: Vivek Silimkhan <126159777+viveksilimkhan1@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:44:01 +0530 Subject: [PATCH] Fix ResourceNotFound in chat model type for AzureOpenAI (#337) * Updated endpoint in model.py * Update spacy_llm/models/rest/azure/model.py * Update spacy_llm/models/rest/azure/model.py --------- Co-authored-by: Raphael Mitsch --- spacy_llm/models/rest/azure/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy_llm/models/rest/azure/model.py b/spacy_llm/models/rest/azure/model.py index a30173ff..a5000d9b 100644 --- a/spacy_llm/models/rest/azure/model.py +++ b/spacy_llm/models/rest/azure/model.py @@ -48,7 +48,8 @@ def endpoint(self) -> str: return ( self._endpoint + ("" if self._endpoint.endswith("/") else "/") - + f"openai/deployments/{self._name}/{self._model_type.value}" + + f"openai/deployments/{self._name}/{'' if self._model_type == ModelType.COMPLETION else 'chat/'}" + f"completions" ) @property