Commit c9898f4
* feat: add data_model parameter to to_solver() for structured output in evals
When a data_model (Pydantic model) is provided to .to_solver(), the solver
uses .chat_structured_async() instead of .chat_async() to generate responses.
The resulting Pydantic model instance is serialized to JSON and set as the
completion text in state.output.completion.
This allows using chatlas for structured data extraction tasks in Inspect AI
evaluations, where scorers can parse and validate the JSON output.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* docs: add PR number to CHANGELOG entry
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* refactor: consolidate completion logic in to_solver()
Move all completion text determination to one place, right before
setting state.output.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Apply suggestions from code review
* Update chatlas/_chat.py
---------
Co-authored-by: Claude Opus 4.5 <[email protected]>
1 parent b32db90 commit c9898f4
File tree
4 files changed
+320
-3
lines changed- chatlas
- tests
- _vcr/test_inspect
4 files changed
+320
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
| 839 | + | |
839 | 840 | | |
840 | 841 | | |
841 | 842 | | |
| |||
847 | 848 | | |
848 | 849 | | |
849 | 850 | | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
850 | 856 | | |
851 | 857 | | |
852 | 858 | | |
| |||
977 | 983 | | |
978 | 984 | | |
979 | 985 | | |
980 | | - | |
981 | | - | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
982 | 994 | | |
983 | 995 | | |
984 | 996 | | |
| |||
1001 | 1013 | | |
1002 | 1014 | | |
1003 | 1015 | | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1004 | 1021 | | |
1005 | 1022 | | |
1006 | 1023 | | |
1007 | | - | |
| 1024 | + | |
1008 | 1025 | | |
1009 | 1026 | | |
1010 | 1027 | | |
| |||
0 commit comments