Skip to content

Commit

Permalink
enh: warn when overriding model in Azure endpoint (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez authored Oct 29, 2024
1 parent 8834114 commit 08a9f13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion nbs/src/nixtla_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,8 @@
" return resp\n",
"\n",
" def _maybe_override_model(self, model: str) -> str:\n",
" if self._is_azure:\n",
" if self._is_azure and model != 'azureai':\n",
" warnings.warn(\"Azure endpoint detected, setting `model` to 'azureai'.\")\n",
" model = 'azureai'\n",
" return model\n",
"\n",
Expand Down
3 changes: 2 additions & 1 deletion nixtla/nixtla_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,8 @@ def _make_partitioned_requests(
return resp

def _maybe_override_model(self, model: str) -> str:
if self._is_azure:
if self._is_azure and model != "azureai":
warnings.warn("Azure endpoint detected, setting `model` to 'azureai'.")
model = "azureai"
return model

Expand Down

0 comments on commit 08a9f13

Please sign in to comment.