How to Use the New Google Chrome Prompt API (Step-by-Step Guide)

Описание к видео How to Use the New Google Chrome Prompt API (Step-by-Step Guide)

Want to get started with the new Google Chrome Prompt API? 🚀

0:10 Flags Page
0:28 Components Page
0:45 Create a new session using window.ai
1:08 Prompt Function

In this video, we’ll walk you through a simple step-by-step guide to enable and use the Prompt API in Chrome.

Whether you're a developer exploring the latest web technologies or just curious about Chrome’s new capabilities, this guide will help you set up everything in no time!

Step-by-Step Instructions:
1. Download Chrome Canary
Start by downloading Chrome Canary, the experimental version of Chrome.

2. Enable Prompt API
Open chrome://flags and enable both:
Prompt API
Optimization guide on device

3. Restart Chrome
After enabling the flags, restart your browser.

4. Check Components
Go to chrome://components and look for “Optimization Guide On Device Model.” Ensure its stats are up to date.

5. Use DevTools
If the component isn’t listed or up to date, open DevTools and run this command in the console:
await window.ai.languageModel.create();

6. Restart Again
After running the command, restart Chrome once more. Now, the Prompt API should be fully functional!

🎥 Watch this tutorial to see each step in action and get the most out of Chrome’s new features. Don’t forget to like, subscribe, and hit the bell icon for more tech guides and updates!

Комментарии

Информация по комментариям в разработке