koishi-plugin-chatluna-google-gemini-adapter 1.3.12 → 1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +10 -7
- package/lib/index.mjs +10 -7
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -350,13 +350,14 @@ function prepareModelConfig(params, pluginConfig) {
|
|
|
350
350
|
thinkingBudget = void 0;
|
|
351
351
|
const match = model.match(/-(low|medium|high|tiny)-thinking/);
|
|
352
352
|
if (match && match[1]) {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
353
|
+
const level = match[1];
|
|
354
|
+
model = model.replace(`-${level}-thinking`, "");
|
|
355
|
+
if (level === "tiny") {
|
|
356
|
+
thinkingLevel = void 0;
|
|
357
|
+
thinkingBudget = 128;
|
|
358
|
+
} else {
|
|
359
|
+
thinkingLevel = level;
|
|
360
|
+
}
|
|
360
361
|
} else {
|
|
361
362
|
thinkingLevel = "THINKING_LEVEL_UNSPECIFIED";
|
|
362
363
|
}
|
|
@@ -371,6 +372,8 @@ function prepareModelConfig(params, pluginConfig) {
|
|
|
371
372
|
let imageGeneration = pluginConfig.imageGeneration ?? false;
|
|
372
373
|
if (imageGeneration) {
|
|
373
374
|
imageGeneration = params.model.includes("gemini-2.0-flash-exp") || params.model.includes("image");
|
|
375
|
+
thinkingBudget = void 0;
|
|
376
|
+
thinkingLevel = void 0;
|
|
374
377
|
}
|
|
375
378
|
return {
|
|
376
379
|
model,
|
package/lib/index.mjs
CHANGED
|
@@ -347,13 +347,14 @@ function prepareModelConfig(params, pluginConfig) {
|
|
|
347
347
|
thinkingBudget = void 0;
|
|
348
348
|
const match = model.match(/-(low|medium|high|tiny)-thinking/);
|
|
349
349
|
if (match && match[1]) {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
350
|
+
const level = match[1];
|
|
351
|
+
model = model.replace(`-${level}-thinking`, "");
|
|
352
|
+
if (level === "tiny") {
|
|
353
|
+
thinkingLevel = void 0;
|
|
354
|
+
thinkingBudget = 128;
|
|
355
|
+
} else {
|
|
356
|
+
thinkingLevel = level;
|
|
357
|
+
}
|
|
357
358
|
} else {
|
|
358
359
|
thinkingLevel = "THINKING_LEVEL_UNSPECIFIED";
|
|
359
360
|
}
|
|
@@ -368,6 +369,8 @@ function prepareModelConfig(params, pluginConfig) {
|
|
|
368
369
|
let imageGeneration = pluginConfig.imageGeneration ?? false;
|
|
369
370
|
if (imageGeneration) {
|
|
370
371
|
imageGeneration = params.model.includes("gemini-2.0-flash-exp") || params.model.includes("image");
|
|
372
|
+
thinkingBudget = void 0;
|
|
373
|
+
thinkingLevel = void 0;
|
|
371
374
|
}
|
|
372
375
|
return {
|
|
373
376
|
model,
|
package/package.json
CHANGED