Commit b549ab4
fix: make InvocationEvent.content optional so the Web UI can save eval cases
InvocationEvent.content was typed Optional[Content] but had no default. Under
Pydantic v2 an Optional field without a default is still required, so saving an
eval case whose event carries no content (as the Web UI does) failed model
validation and the save PUT returned HTTP 422. Default content to None so an
omitted or empty content is accepted.
Close google#6336
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 9510534131 parent 1890557 commit b549ab4
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
0 commit comments