`window.ai` no longer exists. This is an outdated iteration of the Writing Assitance and Prompt API. See here for the current API shapes: - https://github.com/webmachinelearning/writing-assistance-apis - https://github.com/webmachinelearning/prompt-api