- Issue created by @mindaugasd
- Status changed to Fixed
4 months ago 7:54am 26 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.
Drupal being a truly open project has to ensure users can choose which AI service they want to use instead of depending (hard-coding) a single one, therefore Drupal needs an LLM abstraction layer separating and decoupling Drupal features from AI services, enabling to quickly switch service provider when needed without any hassle.
LLM abstraction has to cover needs of different Drupal projects (wysiwyg, chat, translations, interpolations etc...) providing a single API to define, configure and use LLMs.
There are great examples in Python world where libraries such as https://github.com/BerriAI/litellm managed to create a single API to access them all. Its tons of work and maintenance, so Drupal don't have to cover all those LLMs, but Drupal has to provide baseline API for everyone build upon.
Proposal is to create these building blocks:
Example would be AI chat user interface → , where it is best to embed LLM configuration form inline in multiple existing places (entity type form, chat form), also have it overriddable configuration within context where user is actually using the app instead opening separate windows and getting lost. Separate windows would also be there depending on application requirements.
Having LLM as form element would provide flexibility. and where to actually store that configuration, I am not sure. Each module can store configuration where they want. And AI module can provide or recommend a default way to store config. For example, we could even imagine that Augmentor → module could plug into this LLM abstraction layer and store configuration the same way like before but get access to great deal of new LLMs and have configuration form sorted.
Actual form element should be configurable: enable, disable and change various features.
Actual LLMs I think have to be provided by user contributed modules using a plugin system, examples:
Examples of similar projects:
Fixed
1.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.