Problem/Motivation

There has been a lot of similar code in OpenAI type of provider modules. That's bad for maintainability for instance.

Proposed resolution

Make AzureProvider extend OpenAiBasedProviderClientBase and remove all the code that can be inherited from the base class.

Remaining tasks

Figure out a way to work around the incompatibilities of getClient() and loadClient() calls - that's where some of the custom Azure specifics live.

I think we can do that.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jhuhta created an issue. See original summary.

jhuhta’s picture

jhuhta changed the visibility of the branch 3552969-refactor-azureprovider-to to hidden.

jhuhta changed the visibility of the branch 3552969-refactor-azureprovider-to to hidden.

jhuhta changed the visibility of the branch 3552969-refactor-azureprovider-to to active.

jhuhta’s picture

Assigned: jhuhta » marcus_johansson
Status: Active » Needs review
marcus_johansson’s picture

Status: Needs review » Needs work

Code looks good and tested against one chat provider.

However, it needs to be pinned to Drupal AI 1.2.0, since that's where the OpenAI base class resides.

jhuhta’s picture

Status: Needs work » Needs review

Maybe we should also bump the version of this module to 1.2.x-dev.

jhuhta’s picture

Version: 1.1.x-dev » 1.2.x-dev

jhuhta changed the visibility of the branch 1.1.x to hidden.

jhuhta changed the visibility of the branch 3552969-refactor-azureprovider-to to hidden.