mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-26 13:19:49 +07:00
Fixes to AI samples (#1479)
* Migrate to latest summarizer API * fix temperature to be less creative
This commit is contained in:
@@ -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' }]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user