Set default values for additional operation types

Created on 30 April 2025, 4 days ago

Problem/Motivation

Currently, the assignment of default values is hardcoded for the following operation types:

  • chat
  • chat_with_image_vision
  • chat_with_complex_json
  • text_to_image
  • embeddings
  • text_to_speech
  • speech_to_text
  • moderation

The 1.1.x version of the AI module has some additional operation types:

  • Chat with Structured Response
  • Chat with Tools/Function Calling

These additional ones needs to be handled or would be better if we can have this list of operation type dynamic so that every time there's is modification to these could be handled automatically.

Steps to reproduce

modules/contrib/ai_provider_openai/src/Form/OpenAiConfigForm.php

 $this->aiProviderManager->defaultIfNone('chat', 'openai', 'gpt-4o');
    $this->aiProviderManager->defaultIfNone('chat_with_image_vision', 'openai', 'gpt-4o');
    $this->aiProviderManager->defaultIfNone('chat_with_complex_json', 'openai', 'gpt-4o');
    $this->aiProviderManager->defaultIfNone('text_to_image', 'openai', 'dall-e-3');
    $this->aiProviderManager->defaultIfNone('embeddings', 'openai', 'text-embedding-3-small');
    $this->aiProviderManager->defaultIfNone('text_to_speech', 'openai', 'tts-1-hd');
    $this->aiProviderManager->defaultIfNone('speech_to_text', 'openai', 'whisper-1');
    $this->aiProviderManager->defaultIfNone('moderation', 'openai', 'omni-moderation-latest');

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.1

Component

Code

Created by

🇮🇳India prashant.c Dharamshala

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

Comments & Activities

Production build 0.71.5 2024