Skip to content

Conversation

@medihack
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 10, 2025 15:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Updates the chat client to use the instructor library for structured LLM outputs and ensures compatibility with llama.cpp by enabling Jinja templating and updating Docker image tags.

  • Replaced OpenAI's beta structured output API with instructor library for more flexible LLM compatibility
  • Added llama.cpp Jinja templating support and updated Docker images to latest versions
  • Simplified the data extraction flow by removing intermediate parsing steps

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
radis/chats/utils/chat_client.py Refactored to use instructor library instead of OpenAI's beta API for structured outputs
pyproject.toml Added instructor library dependency
docker-compose.dev.yml Enabled Jinja templating and updated llama.cpp Docker image versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

assert event
logger.debug("Received from LLM: %s", event)
return event
logger.debug("Received from LLM: %s", result)
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the assertion check for the parsed event could lead to returning None or invalid results. The original code had assert event to ensure a valid response was received before returning it.

Suggested change
logger.debug("Received from LLM: %s", result)
logger.debug("Received from LLM: %s", result)
assert result is not None, "LLM returned None for extract_data"

Copilot uses AI. Check for mistakes.
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