Skip to content

Conversation

@cpsievert
Copy link
Collaborator

Closes #205

@cpsievert cpsievert requested a review from Copilot November 5, 2025 16:00
Copy link
Contributor

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 fixes the handling of PDF encoding when converting between Chatlas and Inspect content formats. Previously, PDF binary data was incorrectly being decoded/encoded as UTF-8, which would fail for binary content. The fix uses base64 encoding to properly handle PDF data as text-safe strings during serialization.

Key changes:

  • Added base64 import for proper binary data encoding
  • Updated PDF-to-Inspect conversion to use base64 encoding instead of UTF-8 decoding
  • Updated Inspect-to-PDF conversion to use base64 decoding instead of UTF-8 encoding

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cpsievert cpsievert marked this pull request as ready for review November 5, 2025 16:23
@cpsievert cpsievert merged commit 9cf9159 into main Nov 5, 2025
7 checks passed
@cpsievert cpsievert deleted the fix/inspect-pdf branch November 6, 2025 15:33
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.

[BUG] UnicodeDecodeError when using export_eval containing PDF content

2 participants