MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.26k stars 21.43k forks source link

Calling with image_url needs updating #117996

Closed kirkhofer closed 10 months ago

kirkhofer commented 10 months ago

The original code example is incorrect. Calling with an image_url requires a bit of different syntax:

Here is an example:

{
    "messages":[
        {
        "role": "user",
        "content": [
            {"type": "text", "text": "What's in this image?"},
            {
            "type": "image_url",
            "image_url": {
                "url": "https://learn.microsoft.com/azure/ai-services/computer-vision/media/quickstarts/presentation.png"
            }
            }
        ]
        }
    ],
    "max_tokens":300
}

You can see the logic in the OpenAI documentation here


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

SaibabaBalapur-MSFT commented 10 months ago

@kirkhofer Thanks for your feedback! We will investigate and update as appropriate.

RamanathanChinnappan-MSFT commented 10 months ago

@kirkhofer I've delegated this to @PatrickFarley, a content author, to review and share their valuable insights.

PatrickFarley commented 10 months ago

Thank you, Both input formats work. I'll ask the engineer to confirm our choice to recommend the current format.

PatrickFarley commented 10 months ago

I got the go-ahead to match OpenAI's style. PR here https://github.com/MicrosoftDocs/azure-docs/issues/117996

please-close