Fixes to AI samples (#1479)

* Migrate to latest summarizer API

* fix temperature to be less creative
This commit is contained in:
Sebastian Benz
2025-05-23 17:29:23 +02:00
committed by GitHub
parent a8aec773d8
commit 20d36c7780
4 changed files with 29 additions and 36 deletions

View File

@@ -8,7 +8,7 @@ chrome.runtime.onInstalled.addListener(() => {
async function generateAltText(imgSrc) {
// Create the model (we're not checking availability here, but will simply fail with an exception
const session = await self.LanguageModel.create({
temperature: 0.8,
temperature: 0.0,
topK: 1.0,
expectedInputs: [{ type: 'image' }]
});