[DRAFT] FIX: send images with oai targets notebook and gui#2038
Draft
jbolor21 wants to merge 1 commit into
Draft
[DRAFT] FIX: send images with oai targets notebook and gui#2038jbolor21 wants to merge 1 commit into
jbolor21 wants to merge 1 commit into
Conversation
4ff7a0b to
f6af98c
Compare
romanlutz
reviewed
Jun 18, 2026
| @@ -242,7 +243,8 @@ async def _construct_input_item_from_piece_async(self, piece: MessagePiece) -> d | |||
| } | |||
| if piece.converted_value_data_type == "image_path": | |||
| data_url = await convert_local_image_to_data_url_async(piece.converted_value) | |||
| return {"type": "input_image", "image_url": {"url": data_url}} | |||
| image_url: Any = data_url if self._image_url_as_string else {"url": data_url} | |||
Contributor
There was a problem hiding this comment.
I think we should do an analysis of the API docs by OpenAI, then try both with all the OpenAI response targets we have and see what works. I would prefer not to support both if possible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
[WIP]
OAI API needs images sent as a string not an object. this draft PR keeps both versions for temporary backward compatibility while we decide better design or if we need to support both versions
Tests and Documentation
ran all tests
ran gui manually
ran notebooks manually