Inspiration

In order to protect personal privacy, we want to build a local-first ai based web extension and everything is running in browser only.

What it does

A simple web extension for daily surfing internet. The features:

  • chatting with page
  • page summariser
  • language detector and translator
  • system prompt management
  • quick action management
  • all created system prompts and quick actions can be used in future interaction.

How we built it

We built it with the following tools

  • plasmo
  • gemini nano
  • langchain textsplitter
  • ai code editors: cursor and zed
  • react
  • tailwind

Challenges we ran into

  1. how to summarise a long page.

we solved this with two actions:

  • cleaning all unnecessary tags such as the img or code before passing to the summariser.
  • when the cleaned data is still too long, it will be split with langchain text splitter as chunks. then summarising each chunk and joining all results as the final summary.
  1. how to chat with a long page.

we solved this with two actions:

  • keeping no chatting history because we found it is not so necessary in most of the cases.
  • instead of using the raw page text, we used the summary of this page as the context for the chatting.

Accomplishments that we're proud of

  1. supporting the long context for nano.
  2. providing an extensible tool which supports managing the system prompts and creating the simple tools based on nano api.
  3. we are satisfied with the UI we built.

What we learned

  1. preprocessing the data before passing it to the AI model.
  2. writing an efficient prompt for nano.

What's next for tsw-nano

  1. evolving with nano together
  2. integrating with gemini api service.

Built With

Share this project:

Updates