3 ms·
That's just some supplemental code. The actual API is: const session = await window.ai.createTextSession() const outputText = await session.prompt(inpu
by dchest 2y ago
That's just some supplemental code. The actual API is:
const session = await window.ai.createTextSession()
const outputText = await session.prompt(inputText)
That's all there is for now (createGenericSession does the same at this time, and there are canCreateTextSession/canCreateGenericSession).
- dchest 2y agoUpdate: there's actually quite a lot more: https://github.com/explainers-by-googlers/prompt-api https://github.com/explainers-by-googlers/prompt-api