Skip to content

Commit 6c10b0a

Browse files
authored
Merge pull request #272 from vicsanity623/vicsanity
Log error message on validation failure
2 parents 8799f0c + 55ad993 commit 6c10b0a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/pyob/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ def get_valid_llm_response_engine(
381381

382382
# If still invalid, back off and retry
383383
wait = 300 if is_cloud else 10
384+
385+
# --- ADD THIS LINE SO YOU CAN SEE WHAT IT FAILED ON ---
386+
logger.error(f"Validation Failed! The AI said: '{response_text}'")
387+
384388
logger.warning(f"AI response failed validation. Backing off {wait}s...")
385389
time.sleep(wait)
386390
attempts += 1

0 commit comments

Comments
 (0)