Potential errors in vision model

Created on 16 January 2025, 4 days ago

Cross posting from https://www.drupal.org/project/ai_image_alt_text/issues/3500084 πŸ’¬ What provider should be configured to make this work? Active

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

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany marcus_johansson

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

Comments & Activities

  • Issue created by @marcus_johansson
  • πŸ‡ΊπŸ‡ΈUnited States theMusician

    I also get errors when trying to use the core AI module content suggestions, config/ai/suggestions.

    This is what is returned when trying to analyze the page title for an improved title:

    Error: Call to a member function setChatSystemRole() on null in Drupal\ai_content_suggestions\AiContentSuggestionsPluginBase->sendChat() (line 310 of /app/web/modules/contrib/ai/modules/ai_content_suggestions/src/AiContentSuggestionsPluginBase.php)

    and this is from trying to analyze the body content for readability:
    Error: Call to a member function setChatSystemRole() on null in Drupal\ai_content_suggestions\AiContentSuggestionsPluginBase->sendChat() (line 310 of /app/web/modules/contrib/ai/modules/ai_content_suggestions/src/AiContentSuggestionsPluginBase.php)

Production build 0.71.5 2024