@langchain/google-genai 0.1.8 → 0.1.9
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/chat_models.cjs +2 -2
- package/dist/chat_models.d.ts +1 -1
- package/dist/chat_models.js +2 -2
- package/package.json +1 -1
package/dist/chat_models.cjs
CHANGED
|
@@ -507,8 +507,8 @@ class ChatGoogleGenerativeAI extends chat_models_1.BaseChatModel {
|
|
|
507
507
|
throw new Error("`maxOutputTokens` must be a positive integer");
|
|
508
508
|
}
|
|
509
509
|
this.temperature = fields?.temperature ?? this.temperature;
|
|
510
|
-
if (this.temperature && (this.temperature < 0 || this.temperature >
|
|
511
|
-
throw new Error("`temperature` must be in the range of [0.0,
|
|
510
|
+
if (this.temperature && (this.temperature < 0 || this.temperature > 2)) {
|
|
511
|
+
throw new Error("`temperature` must be in the range of [0.0,2.0]");
|
|
512
512
|
}
|
|
513
513
|
this.topP = fields?.topP ?? this.topP;
|
|
514
514
|
if (this.topP && this.topP < 0) {
|
package/dist/chat_models.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface GoogleGenerativeAIChatInput extends BaseChatModelParams, Pick<G
|
|
|
48
48
|
/**
|
|
49
49
|
* Controls the randomness of the output.
|
|
50
50
|
*
|
|
51
|
-
* Values can range from [0.0,
|
|
51
|
+
* Values can range from [0.0,2.0], inclusive. A value closer to 2.0
|
|
52
52
|
* will produce responses that are more varied and creative, while
|
|
53
53
|
* a value closer to 0.0 will typically result in less surprising
|
|
54
54
|
* responses from the model.
|
package/dist/chat_models.js
CHANGED
|
@@ -504,8 +504,8 @@ export class ChatGoogleGenerativeAI extends BaseChatModel {
|
|
|
504
504
|
throw new Error("`maxOutputTokens` must be a positive integer");
|
|
505
505
|
}
|
|
506
506
|
this.temperature = fields?.temperature ?? this.temperature;
|
|
507
|
-
if (this.temperature && (this.temperature < 0 || this.temperature >
|
|
508
|
-
throw new Error("`temperature` must be in the range of [0.0,
|
|
507
|
+
if (this.temperature && (this.temperature < 0 || this.temperature > 2)) {
|
|
508
|
+
throw new Error("`temperature` must be in the range of [0.0,2.0]");
|
|
509
509
|
}
|
|
510
510
|
this.topP = fields?.topP ?? this.topP;
|
|
511
511
|
if (this.topP && this.topP < 0) {
|