@langchain/google-common 0.2.13 → 0.2.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/dist/utils/gemini.cjs +1 -4
- package/dist/utils/gemini.js +1 -4
- package/package.json +1 -1
package/dist/utils/gemini.cjs
CHANGED
|
@@ -1258,7 +1258,7 @@ function getGeminiAPI(config) {
|
|
|
1258
1258
|
// Add thinking configuration if explicitly set
|
|
1259
1259
|
// Note that you cannot have thinkingBudget set to 0 and includeThoughts true
|
|
1260
1260
|
if (typeof parameters.maxReasoningTokens !== "undefined") {
|
|
1261
|
-
const includeThoughts = parameters.maxReasoningTokens
|
|
1261
|
+
const includeThoughts = parameters.maxReasoningTokens !== 0;
|
|
1262
1262
|
ret.thinkingConfig = {
|
|
1263
1263
|
thinkingBudget: parameters.maxReasoningTokens,
|
|
1264
1264
|
includeThoughts,
|
|
@@ -1426,9 +1426,6 @@ function validateGeminiParams(params) {
|
|
|
1426
1426
|
throw new Error("`maxOutputTokens` must be a positive integer");
|
|
1427
1427
|
}
|
|
1428
1428
|
if (typeof params.maxReasoningTokens !== "undefined") {
|
|
1429
|
-
if (params.maxReasoningTokens < 0) {
|
|
1430
|
-
throw new Error("`maxReasoningTokens` must be non-negative integer");
|
|
1431
|
-
}
|
|
1432
1429
|
if (typeof params.maxOutputTokens !== "undefined") {
|
|
1433
1430
|
if (params.maxReasoningTokens >= params.maxOutputTokens) {
|
|
1434
1431
|
throw new Error("`maxOutputTokens` must be greater than `maxReasoningTokens`");
|
package/dist/utils/gemini.js
CHANGED
|
@@ -1248,7 +1248,7 @@ export function getGeminiAPI(config) {
|
|
|
1248
1248
|
// Add thinking configuration if explicitly set
|
|
1249
1249
|
// Note that you cannot have thinkingBudget set to 0 and includeThoughts true
|
|
1250
1250
|
if (typeof parameters.maxReasoningTokens !== "undefined") {
|
|
1251
|
-
const includeThoughts = parameters.maxReasoningTokens
|
|
1251
|
+
const includeThoughts = parameters.maxReasoningTokens !== 0;
|
|
1252
1252
|
ret.thinkingConfig = {
|
|
1253
1253
|
thinkingBudget: parameters.maxReasoningTokens,
|
|
1254
1254
|
includeThoughts,
|
|
@@ -1416,9 +1416,6 @@ export function validateGeminiParams(params) {
|
|
|
1416
1416
|
throw new Error("`maxOutputTokens` must be a positive integer");
|
|
1417
1417
|
}
|
|
1418
1418
|
if (typeof params.maxReasoningTokens !== "undefined") {
|
|
1419
|
-
if (params.maxReasoningTokens < 0) {
|
|
1420
|
-
throw new Error("`maxReasoningTokens` must be non-negative integer");
|
|
1421
|
-
}
|
|
1422
1419
|
if (typeof params.maxOutputTokens !== "undefined") {
|
|
1423
1420
|
if (params.maxReasoningTokens >= params.maxOutputTokens) {
|
|
1424
1421
|
throw new Error("`maxOutputTokens` must be greater than `maxReasoningTokens`");
|