Drupal is a registered trademark of Dries Buytaert
Release: Excel Serialization 2.1.2 Minor update available for module xls_serialization (2.1.2). Release: Time Zone Field 8.x-1.14 Minor update available for module tzfield (8.x-1.14). Module Revived: Entity API 8.x-1.7 Module entity updated after 17 months of inactivity (8.x-1.7). Release: Vartheme Bs5 4.1.1 Minor update available for theme vartheme_bs5 (4.1.1). Release: Varbase Heroslider 1.1.3 Minor update available for module varbase_heroslider (1.1.3). Release: Varbase Demo 1.1.2 Minor update available for module varbase_demo (1.1.2). Release: Varbase Dashboards 2.0.3 Minor update available for module varbase_dashboards (2.0.3). Release: Varbase AI 2.0.9 Minor update available for module varbase_ai (2.0.9). Release: Varbase Workflow 3.1.2 Minor update available for module varbase_workflow (3.1.2). Security Coverage: Role Aware Maxlength Module role_aware_maxlength now has official Drupal security advisory coverage.

AI Block

4 sites No security coverage AI ecosystem
View on drupal.org

This module provides a Drupal block where you can input a prompt to an AI. You can then programmatically feed data to the prompt, and the AI's response will be displayed in the block, similar to how Strava summarizes athlete data. This allows for dynamic content generation based on your site's data.

AI block

Ai block gives you a block where you can configure a prompt.
You can provide data (programmatically) and the output will be the output of the prompt.

Usage

Similar to Strava's athlete intelligence (where it summarises data for you).
You could use it to summarise the views data on the page or other similar things.

Inspiration

Pre

  • Make sure you have the AI module enabled.
  • Make sure you have at least one ai provider module enabled.

Configuration

Step 1 Add the block to the page.
Step 2 Configure the block

Output

Output is just rendered (not streamed yet) to the frontpage

Hooks:

function hook_ai_block_prompt_alter(&$prompt, $blockId) {

This hook allows you to alter the prompt (if you want to create your own replacement tokens [view-data] or [my-whatever-data], you can then replace it in the alter function with the actual data.

function hook_ai_block_response_alter(&$aiResponse, $blockId) {

If you would want to alter the response, this is the place to be.
For example if the ai returns markdown and you want to turn it into something else.

Activity

Tracked releases
2
Tracked since
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Release date
1.0.x-dev Dev Feb 6, 2025
1.0.0 Stable Feb 6, 2025