Skip to content

swissspidy/ai-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

414 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress AI Experiments

Commit activity Code Coverage License

Client-side AI experiments using Chrome's built-in AI and other solutions.

Note: Requires Chrome Canary.

Try it now in your browser:

Test on WordPress Playground

Or install and activate the latest nightly build on your own WordPress website:

Download latest nightly build

Features

“Help me write”

Generate new content given your ideas, in the same tone as your other existing content.

Options for rewriting individual paragraphs à la Google Doc, like rephrasing, shortening or elaborating.

"Help me write" integration

On-device.AI.-.Rephrase.paragraph.mov

There is also some basic autocomplete functionality to finish sentences:

Screenshot 2024-10-29 at 15 10 27 Screenshot 2024-10-29 at 15 10 20

Screen.Recording.2024-10-29.at.15.09.47.mov

Generate headlines & permalinks

Headline generation:

Screenshot 2024-10-29 at 17 17 02

Screen.Recording.2024-10-29.at.17.16.39.mov

Permalink generation:

Screenshot 2024-10-29 at 17 25 38

Screen.Recording.2024-10-29.at.17.25.13.mov

Writing meta descriptions based on the content

Using a simple prompt to summarize the content in only a few sentences.

On-device.AI.-.Write.excerpt.mov

Generate image captions / alternative text

Uses Transformers.js and Florence-2 to generate image captions and alternative text for images directly in the editor. Also integrated into Media Experiments, which supports video captioning too.

On-device.AI.-.Image.captioning.mov

Generate a memorable quote

A slight variation on the summarization use case, this extracts a memorable quote from the article and gives it some visual emphasis.

On-device.AI.-.Memorable.quote.mov

Assigning tags & categories to blog posts

Suggest matching tags/categories based on the content. Grabs a list of existing terms from the site and passes it to the prompt together with the post content.

On-device.AI.-.Add.tags.mov

Provide tl;dr to visitors

Uses Chrome’s built-in summarization API to provide readers a short summary of the post content. The UI is powered by WordPress’ new Interactivity API.

Content summarization example

On-device.AI.-.Summarize.article.mov

Also supports summarizing comments:

Comment summarization example

Sentiment analysis for content / comments

Using a simple prompt to say whether the text is positive or negative. Could be used to suggest rephrasing the text à la Grammarly, or identify negative comments.

On-device.AI.-.Sentiment.analysis.mov

Content translation

In the editor, instantly translate your content into another language. Useful for multilingual websites.

Screenshot 2024-10-29 at 12 18 44 Screenshot 2024-10-29 at 12 18 51

On the frontend, translate comments written in another language or translate the post content to your preferred language.

Screenshot 2024-10-29 at 12 19 09

About

WordPress on-device AI experiments

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors