Skip to content

Commit

Permalink
docs: add polyfill doc in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jeasonstudio committed Jul 9, 2024
1 parent c8aca0f commit 9e69a65
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
> ⚠️ Note:
> * This module is under development and may contain errors and frequent incompatible changes.
> * Chrome's implementation of [built-in AI with Gemini Nano](https://developer.chrome.com/docs/ai/built-in) is an experiment and will change as they test and address feedback.
> * If you've never heard of it before, [follow these steps](#enable-ai-in-chrome) to turn on Chrome's built-in AI.
> * If you've never heard of it before, [follow these steps](#enabling-ai-in-chrome) to turn on Chrome's built-in AI.
## 📦 Installation

Expand Down Expand Up @@ -189,7 +189,7 @@ for await (const partialObject of result.partialObjectStream) {

> Due to model reasons, `toolCall/functionCall` are not supported. We are making an effort to implement these functions by prompt engineering.
## Enable AI in Chrome
## Enabling AI in Chrome

Chrome built-in AI is a preview feature, you need to use chrome version 127 or greater, now in [dev](https://www.google.com/chrome/dev/?extra=devchannel) or [canary](https://www.google.com/chrome/canary/) channel, [may release on stable chanel at Jul 17, 2024](https://chromestatus.com/roadmap).

Expand All @@ -198,6 +198,14 @@ After then, you should turn on these flags:
* [chrome://flags/#optimization-guide-on-device-model](chrome://flags/#optimization-guide-on-device-model): `Enabled BypassPrefRequirement`
* [chrome://components/](chrome://components/): Click `Optimization Guide On Device Model` to download the model.

Or you can try using the experimental feature: `chrome-ai/polyfill`, to use `chrome-ai` in any browser that supports WebGPU and WebAssembly.

```ts
import 'chrome-ai/polyfill';
// or
requre('chrome-ai/polyfill');
```

## License

[MIT](LICENSE) License © 2024 [Jeason](https://github.com/jeasonstudio)

0 comments on commit 9e69a65

Please sign in to comment.