This simple example shows how to use the LanguageModel.prompt()
method, which sends a one-off text prompt to the built-in AI model and returns a single, complete response. It is a non-streaming operation.
Ready. Enter a prompt and click the button.
To use this feature, you must have the "Enable built-in AI" flag enabled in Chrome. Open a new tab, paste the link below, press Enter, enable the flag, and then restart Chrome.