ai_providers_api
Central API for AI integrations without too much load. If all you need for your AI integration is:
- selecting an AI provider
- selecting a model
- optionally adding additional parameters like max input tokens
- using the API by just calling the configured AI provider plugin
prompt()method and getting output - response streaming API,
this is the right place to be. Also a great place to learn AI integrations without overcomplicated code that can be an entry barrier.
AI integrations are simple: you give it instructions like it was a human, building too much APIs around it is like locking it in a cage and connecting it with artificial interfaces. The author of this module found out that giving it more freedom often yields better results. For example: if you need JSON output - tell it to output JSON instead of developing a "JSON prompt builder API". The only APIs that are actually needed are integrations of tools that use its output, for example - tell it to output a specific yaml structure and use that structure to create entities.
Let's not make rocket science out of it!
For now the module contains provider settings form, one plugin type, one plugin manager and AI reply JS streaming API so replies can appear word-by-word as being generated by LLMs. Hopefully it'll stay simple, every API that will be common for more integration modules is welcome here, UI probably not.
An alternative to the AI module package for developers that prefer to work on simple things.
Modules using it:
- LMS AI - AI integration for Drupal LMS