➡️ Open the playgrounds ⬅️
The files in this directory are playgrounds and samples for the built-in AI APIs in Microsoft Edge.
To learn more, see:
- Prompt a built-in language model with the Prompt API
- Summarize, write, and rewrite text with the Writing Assistance APIs
If you want to make changes to the playgrounds and samples source code, clone this repository and then follow these steps:
-
To make changes to the source HTML content for one of the playgrounds or samples:
This project uses Eleventy to generate the static HTML files. This is useful to avoid having to write the same HTML boilerplate for each playground.
-
Find the playground or sample you want to edit in the
templatesdirectory.Playgrounds start with the
playground-prefix, and samples start with thesample-prefix. -
Make your changes to the HTML file.
-
Run
npm run buildto regenerate the static HTML files in theplaygroundsandsamplesdirectories.
-
-
To make changes to the JavaScript or CSS code for the playgrounds or samples:
Make your changes directly to the JavaScript or CSS files in the
staticdirectory.
Then run the playgrounds locally:
- Run
npm run buildto generate the static site. - Run
cd ../../to go to the Demos repository's parent directory. - Start a local HTTP server from that parent directory. For example:
npx http-server -p 8080. - Go to
http://localhost:8080/Demos/built-in-ai/in your browser.