Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh: warn when overriding model in Azure endpoint #511

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nbs/src/nixtla_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,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 @@ -730,7 +730,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
Loading