Ashik Pasumarthi • 7 months ago
confused in using built in API in my code
Hey guys,
I am working on my idea and started working with the Prompt API , I have gone through the documentation but can I use the code in docu in my project or should I use chrome.ai.prompt kind commands - I am totally confused , any leads here who could clear my confusion would really helpful
Thanks & Regards
Ashik
Comments are closed.

3 comments
François Beaufort Manager • 7 months ago
chrome.ai.prompt is not a thing anymore, you should use LanguageModel.create. See https://developer.chrome.com/docs/ai/prompt-api
Ashik Pasumarthi • 7 months ago
but LanguageModel.create kind of command is used when creating an website / application right? in case of extension I have seen somewhere given and asked to use chrome.ai.prompt
Actually I am create an extension as of now
François Beaufort Manager • 7 months ago
Extensions work the same. See https://github.com/GoogleChrome/chrome-extensions-samples/blob/11898ee8ebbb9ac5ec72408754ef19a05ac93341/functional-samples/ai.gemini-on-device/sidepanel/index.js#L22