Skip to content

Commit

Permalink
Fix ResourceNotFound in chat model type for AzureOpenAI (#337)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
viveksilimkhan1 and rmitsch authored Oct 20, 2023
1 parent 5c2b565 commit 7a0460c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spacy_llm/models/rest/azure/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a0460c

Please sign in to comment.