Commit ff0b750
vlm: never exit 0 with empty output; raw-response debug dump (#77)
A granite-docling run via Ollama printed nothing and exited 0 — the
model's answer produced zero parseable blocks and the empty document
serialized to an empty Markdown. Three fixes:
- an empty parsed document is now a loud error pointing at
DOCLING_RS_VLM_DEBUG and the custom-prompt env, instead of silence
(degradation convention: "nothing convertible at all" errors);
- DOCLING_RS_VLM_DEBUG=1 prints each raw model response (or raw endpoint
body when the shape is unexpected) to stderr, so "what did the model
actually say" takes one env var, not a proxy dump;
- a response with no markup at all (model ignored the instruction and
answered prose/Markdown) degrades to one <text> per non-empty line
instead of dropping the page's content.
Refs #77
Signed-off-by: artiz <artem.kustikov@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EY5KAiquN4YpVf2PXEQkVT1 parent c84ed4c commit ff0b750
1 file changed
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
182 | 194 | | |
183 | 195 | | |
184 | 196 | | |
| |||
264 | 276 | | |
265 | 277 | | |
266 | 278 | | |
267 | | - | |
| 279 | + | |
268 | 280 | | |
269 | 281 | | |
270 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
271 | 292 | | |
272 | 293 | | |
273 | 294 | | |
| |||
287 | 308 | | |
288 | 309 | | |
289 | 310 | | |
290 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
291 | 324 | | |
292 | 325 | | |
293 | 326 | | |
| |||
0 commit comments