Skip to content

Conversation

@markuswustenberg
Copy link
Member

Fixes #19

Copilot AI review requested due to automatic review settings October 16, 2025 09:40
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

This PR adds structured output functionality to the ChatCompleter by implementing response schema support. This allows users to request JSON responses that conform to a specific structure, enabling more reliable parsing and validation of AI responses.

  • Added ResponseSchema field support to ChatCompleteRequest for structured JSON outputs
  • Implemented schema conversion utilities to transform Go schemas into OpenAI-compatible JSON schema format
  • Added comprehensive test coverage for the structured output feature

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
chat_complete.go Core implementation of structured output support including schema conversion and response format configuration
chat_complete_test.go Test case demonstrating structured output functionality with JSON schema validation

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

@markuswustenberg markuswustenberg merged commit f97a393 into main Oct 16, 2025
2 checks passed
@markuswustenberg markuswustenberg deleted the structured-output branch October 16, 2025 09:44
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.

Implement structured output

2 participants