{{ message }}
Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
AsyncDottxt.generate's "missing model identifier" error told users to pass the model tofrom_dottxt_async(), a function that does not exist in outlines. The message now points tofrom_dottxt(), which is the only Dottxt factory and handles both sync and async clients.Why
When
AsyncDottxt.generateis called without amodel=keyword argument and the model was created without an identifier, it raises (src/outlines/models/dottxt.py:235-239):from_dottxt_asyncdoes not exist anywhere in the codebase. outlines exports onlyfrom_dottxt(src/outlines/models/__init__.py:13, listed in__all__at line 65), which dispatches on the client type and returns anAsyncDottxtfor adottxt.AsyncDotTxtclient (src/outlines/models/dottxt.py:285-303). The syncDottxt.generatebranch already saidfrom_dottxt()(src/outlines/models/dottxt.py:139-143); the async branch had drifted.Changes
src/outlines/models/dottxt.py: inAsyncDottxt.generate's error message,from_dottxt_async()→from_dottxt().tests/models/test_dottxt.py: addtest_dottxt_async_missing_model_error_names_existing_factory, which fails if the error names anything other thanfrom_dottxt().Testing
pytest tests/models/test_dottxt.py -m "not api_call"→7 passed, 12 deselected(deselected tests are markedapi_calland require a live Dottxt API key).pre-commit run --all-files→ all hooks passed (check-merge-conflict, debug-statements, end-of-file-fixer, trailing-whitespace, mypy, ruff).Checklist
maincommit;pre-commitis installed and configured on your machine, and you ran it before opening the PR;from_dottxt_async)