Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kowalczyk-krzysztof/dialog-ai
Chrome extension for Google Chrome Built-in AI Challenge
https://github.com/kowalczyk-krzysztof/dialog-ai
ai built-in-ai chrome chrome-extension hackathon
Last synced: 18 days ago
JSON representation
Chrome extension for Google Chrome Built-in AI Challenge
- Host: GitHub
- URL: https://github.com/kowalczyk-krzysztof/dialog-ai
- Owner: kowalczyk-krzysztof
- License: mit
- Created: 2024-10-03T09:52:14.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-28T22:01:03.000Z (2 months ago)
- Last Synced: 2024-11-28T23:18:24.771Z (2 months ago)
- Topics: ai, built-in-ai, chrome, chrome-extension, hackathon
- Language: TypeScript
- Homepage: https://www.youtube.com/watch?v=wRjYjLALB-w
- Size: 580 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Dialog AI
## About
![preview](https://github.com/user-attachments/assets/3de2c831-25d3-4906-b530-259e2c10b9d1)Dialog AI is a Chrome extension built for [Google Chrome Built-in AI Challenge](https://googlechromeai.devpost.com). The extension allows you to leverage new AI APIs in Chrome. Once installed, you can use it on any website by holding Shift and selecting text or by pressing the Shift + D key combination or by clicking the extension icon while you have a website open. Doing so will open a dialog in which you can translate and summarize text and chat with Chrome built-in AI.
## How to use
The APIs used in this extension are still experimental and to use them, you need to download and install [Chrome Canary version](https://www.google.com/chrome/canary).Once `Chrome Canary` is installed, you need to enable the experimental APIs.
1. Open `Chrome Canary`
2. Go to (by entering the following in Chrome address bar) `chrome://flags/#optimization-guide-on-device-model` and select `Enabled BypassPerfRequirement`
3. Go to `chrome://flags/#prompt-api-for-gemini-nano` and select `Enabled`
4. Open developer console by pressing Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux) and paste the following code snippet:
```javascript
await ai.languageModel.create()
```
5. Go to `chrome://components` and find `Optimization Guide On Device Model` then click `Download`. This will download the AI model Chrome uses. It might take some time.
6. Go to `chrome://flags/#summarization-api-for-gemini-nano` and select `Enabled`
7. Open developer console and paste the following code snippet:
```javascript
await ai.summarizer.create()
```
8. Go to `chrome://flags/#translation-api` and select `Enabled without language pack limit`
9. **(Optional)** Install language packs you want to use - `chrome://on-device-translation-internals`. The extension will automatically download the required pack when you select a language pair for the first time, so this step is not necessary.After you have all the APIs enabled and the model has finished downloading, you need to install the extension.
1. Go to [releases](https://github.com/kowalczyk-krzysztof/dialog-ai/releases) and find the latest release.
2. Download `dist.zip` attached to the release and unzip it.
3. Open `Chrome Canary` and go to `chrome://extensions`.
4. Enable developer mode (top right of page).
5. Click `Load unpacked extension` (top left page).
6. Select the directory you unzipped earlier (by default, the name of the directory will be `dist`)Alternatively, if you want to build the extension yourself, you can do that using the steps below (you need to have [Node.js](https://nodejs.org/en) with version `>=20` installed):
1. Clone this repository
2. Run the following commands (in order) in a terminal, while in the root directory of the repository:
```
npm install
npm run build
```
3. Open `Chrome Canary` and go to `chrome://extensions`.
4. Enable developer mode (top right of page).
5. Click `Load unpacked extension` (top left page).
6. Select `dist` directory located in the root of the repository