Skip to content

fix: update adding_new_models notebook to use current ChatTemplate API#1449

Open
octo-patch wants to merge 2 commits into
guidance-ai:mainfrom
octo-patch:fix/update-adding-new-models-notebook
Open

fix: update adding_new_models notebook to use current ChatTemplate API#1449
octo-patch wants to merge 2 commits into
guidance-ai:mainfrom
octo-patch:fix/update-adding-new-models-notebook

Conversation

@octo-patch

Copy link
Copy Markdown

Fixes deprecated API usage in adding_new_models.ipynb notebook. Replaces TransformersChat with ChatTemplate subclass and removes indent_roles() calls.

Add an AzureOpenAI class that mirrors the OpenAI class interface,
allowing users to use guidance.models.AzureOpenAI(model=...,
azure_endpoint=..., azure_deployment=...) instead of the
create_azure_openai_model factory function.
@ErenAta16

Copy link
Copy Markdown

This notebook fix is identical to #1450 (also open, same author, confirmed byte-identical diff on adding_new_models.ipynb), but this branch is based on an old main and its diff against current main pulls in a lot of unrelated churn: it would delete guidance/_uri_validation.py and revert tests/unit/test_bytes_from.py/test_uri_validation.py by 89/137 lines, plus revert several .github/workflows/*.yml changes and other file updates that have landed since this branch was cut. That _uri_validation.py/test_bytes_from.py piece in particular looks like it would undo #1464 (the redirect-revalidation SSRF fix I reviewed earlier), which is already merged-or-mergeable — not something anyone here intends, just a side effect of the branch being stale.

#1450 has the identical notebook fix on a current base with none of that collateral diff, so recommending that one instead — this one is probably worth closing or rebasing rather than merging as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants