Skip to content

Commit 07a734b

Browse files
committed
fix temperature to be less creative
1 parent 57474c7 commit 07a734b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

functional-samples/ai.gemini-on-device-alt-texter/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ chrome.runtime.onInstalled.addListener(() => {
88
async function generateAltText(imgSrc) {
99
// Create the model (we're not checking availability here, but will simply fail with an exception
1010
const session = await self.LanguageModel.create({
11-
temperature: 0.8,
11+
temperature: 0.0,
1212
topK: 1.0,
1313
expectedInputs: [{ type: 'image' }]
1414
});

functional-samples/ai.gemini-on-device-calendar-mate/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function createGoogleCalendarUrl(eventDetails) {
8484

8585
async function parseEventDetails(text) {
8686
const session = await LanguageModel.create({
87-
temperature: 1.0,
87+
temperature: 0,
8888
topK: 1.0
8989
});
9090

0 commit comments

Comments
 (0)