What provider should be configured to make this work?

Created on 15 January 2025, 4 days ago

Problem/Motivation

When setting up AI Image Alt Text at /config/ai/ai_image_alt_text the field for AI provider/model has a default value that reads, "Use Default Image Vision Model."

On the AI Module settings page, where you set default models, config/ai/settings, there is nothing labeled Image Vision Model.

I tried a Chat with Image Vision model and that does appear in the dropdown list but that generates the following error in the logs.

PHP Error:
Error: Call to a member function chat() on null in Drupal\ai_image_alt_text\Controller\GenerateAltText->generate() (line 135 of /app/web/modules/contrib/ai_image_alt_text/src/Controller/GenerateAltText.php).

This leads me to believe the chat model is not what this module expects.

Does the module only work with some AI providers? I was trying Azure OpenAI ChatGPT-4o.

Thank you

πŸ’¬ Support request
Status

Active

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States theMusician

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @theMusician
  • πŸ‡©πŸ‡ͺGermany marcus_johansson

    Hi @themusician - this sounds like an bug in the Azure provider. I have cross posted this in that provider as a bug πŸ› Potential errors in vision model Active

    In general any vision model should work, which many, but not all providers has. So if it shows up under Chat with Image Vision, it should work, with different quality depending on the model. I have never tested Azure, but I know Fireworks, Ollama, OpenAI and Anthropic works well.

    I will use this issue to fix the warning message there, so it actually is consistent to what it is called on the settings page and the warning. And also when I look into the other issue I will keep this open, if it is an actual issue with this module

  • πŸ‡ΊπŸ‡ΈUnited States theMusician

    Thank you. I can confirm using the stand-alone OpenAI module it works great. It does seem to be an issue with the Azure AI module.

Production build 0.71.5 2024