SynapseML OpenAIChatCompletion lacks image support

Hiob Gebisso 121 Reputation points

OpenAIs GPT4-o model allows for an "image_url" as argument type in its Chat Completions API, but the corresponding SynapseML function seems to lack this option according to the documentation

OPENAI chat completions API:

response =
        {"role": "system", "content": "You are a helpful assistant that responds in Markdown. Help me with my math homework!"},
        {"role": "user", "content": [
            {"type": "text", "text": "What's the area of the triangle?"},
            {"type": "image_url", "image_url": {
                "url": ""}

SynapseML function from the documentation:

def setMessagesCol(self, value):
            messagesCol: The column messages to generate chat completions for, in the chat format. This column should have type Array(Struct(role: String, content: String)).
        return self

Simply providing the image url inside the content results in erroneous behaviour of the model, where it makes up the answer without actually processing the image. And a base64 encoded image string exceeds the token limit.

System Information:

  • Language version: python 3.10, scala 2.12.15
  • Spark Version: 3.3
  • Spark Platform : Synapse
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,671 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,613 questions
{count} votes

Accepted answer
  1. Bhargava-MSFT 28,951 Reputation points Microsoft Employee

    Hello Hiob Gebisso,

    Welcome to the Microsft Q&A forum.

    The issue seems to be that SynapseML does not natively support the image_url argument that is available in OpenAI's API.

    I would suggest submitting a feature request using the URL below. This is open for the user community to upvote and comment on. It allows product teams to effectively prioritize your request against our existing feature backlog and provides insight into the potential impact of implementing the suggested feature.

    Please let me know if you have any further questions.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    Comments have been turned off. Learn more