by mikeqq2024 · 2y ago · 0 comments
By the way, haven't touch the lastest JS code for a while, what does this new syntax mean: "import { chromeai } "
Also not get the textStream code: for await (const textPart of textStream) { result = textPart; } does result get override for each loop step?
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).