Skip to content

Conversation

@rm-openai
Copy link
Collaborator

@rm-openai rm-openai commented Oct 14, 2025

To allow the new output types for image/file, you can now return one of the three new types (or lists of those types, or even a typed dict version). If you use those, we'll convert to the correct tool call output type.

Resolves #1850

@rm-openai rm-openai requested a review from seratch October 14, 2025 23:52
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@seratch seratch added enhancement New feature or request feature:core labels Oct 15, 2025
@rm-openai rm-openai force-pushed the rm/pr1898 branch 2 times, most recently from a06bdca to 622b76a Compare October 15, 2025 18:04
@rm-openai
Copy link
Collaborator Author

@codex review

@rm-openai
Copy link
Collaborator Author

@seratch ready for review!

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

Looks good to me; I've confirmed the image_url works with data URL too (using the code from local_image.py).

@seratch
Copy link
Member

seratch commented Oct 16, 2025

If you want to add data URL example too, something like this works, but it's nice-to-have:

FILEPATH = os.path.join(os.path.dirname(__file__), "media/image_bison.jpg") def image_to_base64(image_path): with open(image_path, "rb") as image_file: encoded_string = base64.b64encode(image_file.read()).decode("utf-8") return encoded_string @function_tool def fetch_random_image() -> ToolOutputImage | ToolOutputImageDict: """Fetch a random image.""" print("Image tool called") b64_image = image_to_base64(FILEPATH) return { "type": "image", "image_url": f"data:image/jpeg;base64,{b64_image}", "detail": "auto", }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature:core

2 participants