Proposal for Implementing LLM Abstraction in OpenAI Drupal Modules

Created on 7 March 2024, 8 months ago

Problem/Motivation

I propose an enhancement to the OpenAI Drupal modules to introduce an LLM abstraction layer, allowing them to interface with a broader range of Large Language Models (LLMs) beyond OpenAI.

I have developed an initial module, named LLM Provider Service , which serves as a starting point for this abstraction layer (I am happy to add maintainers). This module enables Drupal to interface with various LLMs. For that, I also provide Drupal LLM Provider for the LM Studio API module for users who want to test local LLMs with Drupal.

As a practical demonstration, I'm including a patch for the OpenAI ChatGPT Explorer module, outlining small amount of required adjustments to leverage the LLM abstraction with LLM Provider Service. This change aims to expand the module's utility, enabling it to work with multiple LLMs and thus enhancing Drupal's AI integration capabilities.

Adopting this abstraction could significantly enhance the flexibility and utility of the OpenAI Drupal modules, opening up opportunities for developers and users to experiment with diverse LLMs within Drupal.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom seogow

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

Comments & Activities

Production build 0.71.5 2024