Getting started with testing the Chrome Browser Prompt API

Preview Image
Visualizing the Chrome Browser
Blog Post

Explore a demo which combines the features of Drupal CMS with a small AI model that runs locally directly in your browser. With the Prompt API and Gemini Nano, you can try out the Drupal CMS AI features without costly and complicated API keys.

This is Sovereign AI: fully private and built using open source models you can control. Please note: as it runs on your local machine, you will ideally need 16GB of RAM and may experience a difference in quality compared to paid-for frontier models.

Start here: if you are anonymous, click Log in in the top-right menu. On mobile, open Menu first, then tap Log in. Use username admin and password admin.

Quick start (2 minutes)

  1. Log in.
  2. Go to Content, then click Edit on this page.
  3. Complete the one-time Gemini Nano download popup when prompted.
  4. Test Alt Text Generation, CKEditor Assistants, Summarisation, and Translation.

Demo features include:

  • Summarisation: A single button to summarise content directly into the Summary fields on Blog Posts.
  • Translation: Simple feature to translate whole pages between English and French.
  • Alt Text Generation: Generate alt text for any uploaded image using the Browser AI.
  • CKEditor Assistants: Use your local AI to summarise, translate or change the tone of specific text.
  • Fully Private Local AI: Example CKEditor buttons to proofread or summarise your text. They work between your browser and its AI directly, opening the door for fully private AI applications. Your data is only sent to the server after you click save.

Your privacy options

  • Sovereign AI: Give your organisation full control. These features keep your data private from AI companies but still pass information back to the website host, allowing use of Drupal governance tools, context, and tool calls without an external API.
  • Local Browser AI: Data never leaves your machine. These features use only browser AI without sending information to the website host, useful for highly confidential information. This option may limit some functionality and governance and is currently experimental.

Demo features - how to

1) Log in and open the demo page for editing

After logging in, click Content, then click Edit on the page named Getting started with testing the Chrome Browser Prompt API.

Drupal content listing screen with edit links

2) One-time setup: Download the AI model (Gemini Nano)

If this is your first time you will need to download the model by clicking the popup:

Chrome Prompt API model download pop-up

3) Alt Text Generation

Upload an image and generate appropriate alt text using Browser AI.

Test this using the image field.

Generate alt text button on image field

4) CKEditor Assistants

All the CKEditor Assistants in Drupal with your local AI.

Try it out by highlighting some text then click Summarise, Translate, or Change tone. Select your preferred CKEditor Assistant. Translation requires language selection and Tone offers a choice of pre-set tones.

AI assistant action list in CKEditor

5) Fully Private Local AI

CKEditor buttons to summarise or proofread the text.

Highlight some text and click one of the Local AI buttons such as Summarise. It will replace the text with the summarised version.

Local AI summarise action in CKEditor

6) Summarisation

Button to summarise content directly into the Summary fields on Blog Posts.

You can also use the Summarize with Google Chrome Provider button.

Summary generation action in blog post form

7) Translation

Simple feature to translate whole pages between English and French.

Try this after saving, using the Translate tab.

Translate tab and translation workflow

If you want to add more languages, use Configuration > Region and Language > Languages.

Summary
A short set of instructions explaining how to test Chrome-related features in the CMS by logging in, creating a blog post, uploading an image, generating a summary with the Chrome provider, and using the built-in translation tools.