Commit ae34803
committed
fix(aicore/filtering): address PR review fixes 21-23
- Add py.typed markers to aicore/ and aicore/filtering/ packages so type
checkers consuming the SDK see the inline annotations (PEP 561).
- Document AICORE_FILTER_TEST_MODEL and AICORE_FILTER_TEST_SELF_HARM_PROMPT
in .env_integration_tests.example alongside the existing AICORE_*
entries, with a comment explaining the self-harm prompt is operator-
populated and kept out of source.
- Narrow extract_filter_blocked's catch-all 'except Exception' to
'(ValueError, KeyError, TypeError, AttributeError)'. Documents the
realistic failure modes (JSON parse, missing key, wrong shape, attr on
non-object) and stops swallowing logic bugs in ContentFilteredError
construction.1 parent 286afb4 commit ae34803
4 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
612 | 617 | | |
Whitespace-only changes.
Whitespace-only changes.
0 commit comments