diff --git a/functional-samples/ai.gemini-on-device/sidepanel/index.js b/functional-samples/ai.gemini-on-device/sidepanel/index.js index 2f11c29f02..8c3b017e90 100644 --- a/functional-samples/ai.gemini-on-device/sidepanel/index.js +++ b/functional-samples/ai.gemini-on-device/sidepanel/index.js @@ -14,7 +14,7 @@ let session; async function runPrompt(prompt, params) { try { if (!session) { - session = await window.ai.assistant.create(params); + session = await window.ai.languageModel.create(params); } return session.prompt(prompt); } catch (e) { @@ -39,7 +39,7 @@ async function initDefaults() { showResponse('Error: window.ai not supported in this browser'); return; } - const defaults = await window.ai.assistant.capabilities(); + const defaults = await window.ai.languageModel.capabilities(); console.log('Model default:', defaults); sliderTemperature.value = defaults.temperature; sliderTopK.value = defaults.topK;