perf(backend): switch weather descriptions to Gemini 2.5 Flash-Lite
- Migrate from gemini-2.0-flash-exp to gemini-2.5-flash-lite - 4x cheaper on input, 6x cheaper on output tokens - Increase maxOutputTokens from 120 to 1000 to accommodate thinking tokens - Fixes empty description issue caused by thinking tokens consuming limit Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -35,7 +35,7 @@ export async function generateWeatherDescription(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp:generateContent?key=${apiKey}`,
|
`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite:generateContent?key=${apiKey}`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -53,7 +53,7 @@ export async function generateWeatherDescription(
|
|||||||
],
|
],
|
||||||
generationConfig: {
|
generationConfig: {
|
||||||
temperature: 0.7,
|
temperature: 0.7,
|
||||||
maxOutputTokens: 120,
|
maxOutputTokens: 1000,
|
||||||
topP: 0.95,
|
topP: 0.95,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user