Skip to content

Conversation

princeaden1
Copy link
Contributor

@princeaden1 princeaden1 commented Jul 5, 2025

What:

  • Bug Fix
  • New Feature
  • Docs

Description:

This pull request adds a new usage example to the README demonstrating how to use the OpenAI to understand and describe images using GPT-4o and an accessible image URL.

Example Included

The example shows how to:

  • Provide both a text prompt and an image URL
  • Output GPT-4o's vision capabilities in a friendly way

Why It's Useful

  • Showcases advanced GPT-4o usag
  • Makes it easy for developers to test image understanding via chat
  • Builds on the existing text-only examples by adding multimodal support

Related:

Copy link
Collaborator

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

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

I think you misunderstood the docs a bit - since you made a new top level "Vision" that is misleading because this is just a regular ole Chat creation endpoint with image_url support. So "Vision resource" suggests there is a new top level Vision API set of endpoints which there isn't - this is just a parameter on Chat.

The amount of variables is a bit heavy for docs. Since we have to balance like 200 endpoints its all about short/sweet. Take a look at the Chat example - https://github.com/openai-php/client?tab=readme-ov-file#chat-resource and see how we have examples for function calls & tool calls - you could expand that with an image_url example.

However saying that too - why increase our documentation for Chat? Responses is the future.

@princeaden1 princeaden1 force-pushed the readme-openai-vision-example branch from 614e497 to 3e0347e Compare July 5, 2025 13:07
@princeaden1
Copy link
Contributor Author

Thank you for the feedback, I've force pushed a clean version of the branch based on main, with a single commit. The image input example is now added under the Chat section, following the existing structure and style. Let me know if anything else needs adjustment. Thank you.

@iBotPeaches iBotPeaches merged commit f017cbb into openai-php:main Jul 5, 2025
12 checks passed
@iBotPeaches
Copy link
Collaborator

thanks!

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