fix: only block vision pipeline if nothing at all was readable
Previously blocked on needs_review when model name/number were empty, even if manufacturer or serial were detected. Now proceeds to specs research whenever any useful field was extracted, only blocking when the nameplate was completely unreadable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
525424a6a1
commit
321f6aaa05
1 changed files with 6 additions and 2 deletions
|
|
@ -43,8 +43,12 @@ final class PhotoUploadHandler
|
||||||
]);
|
]);
|
||||||
$this->jobRepository->save($job);
|
$this->jobRepository->save($job);
|
||||||
|
|
||||||
if ('' === $result['modelNumber'] && '' === $result['modelName']) {
|
$hasAnyInfo = '' !== $result['manufacturer']
|
||||||
$job->markNeedsReview('OllamaVisionAgent: no model detected on nameplate');
|
|| '' !== $result['modelName']
|
||||||
|
|| '' !== $result['modelNumber'];
|
||||||
|
|
||||||
|
if (!$hasAnyInfo) {
|
||||||
|
$job->markNeedsReview('OllamaVisionAgent: nothing readable on nameplate');
|
||||||
$this->jobRepository->save($job);
|
$this->jobRepository->save($job);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue