Commit 825bb2a
committed
feat(translator): add validation for empty string responses from LLM
- Check for empty or whitespace-only responses in addition to None checks
- Raise ValueError with descriptive message when model returns empty content
- Prevents silent failures when translation API returns empty strings1 parent 6aa7f5b commit 825bb2a
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
197 | 209 | | |
198 | 210 | | |
199 | 211 | | |
| |||
0 commit comments