Skip to content

feat(llm): handle structured output responses - #18

Merged
DenisDenis9331 merged 2 commits into
DenisDenis9331:mainfrom
SergoHUH:feat/handle-structured-output-responses
Aug 12, 2026
Merged

feat(llm): handle structured output responses#18
DenisDenis9331 merged 2 commits into
DenisDenis9331:mainfrom
SergoHUH:feat/handle-structured-output-responses

Conversation

@SergoHUH

@SergoHUH SergoHUH commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

#17
Правки

  • Обработчик ответов LLM теперь принимает как готовый Hash, так и JSON-строку
  • Hash обрабатывается напрямую без JSON.parse
  • JSON-строка продолжает обрабатываться прежним способом
  • Repair-запрос выполняется только для невалидной JSON-строки
  • Невалидный Hash завершается понятной ошибкой без повторного запроса к модели
  • Добавлена проверка, что элементы candidates и verdicts являются объектами
  • Сохранены существующие проверки идентификаторов, решений и refinement

Добавлены тесты для:

  • корректных structured-ответов
  • старых JSON-строк
  • невалидного Hash без repair
  • неправильных элементов внутри candidates и verdicts
  • structured-ответа после repair

Comment thread lib/aireview/review_pipeline.rb
@DenisDenis9331

Copy link
Copy Markdown
Owner

добавь плиз описание правок в пр

@DenisDenis9331
DenisDenis9331 merged commit 4b1db0b into DenisDenis9331:main Aug 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants