thinkingBudget added to google gemini. see #494
This commit is contained in:
parent
3c919ac67d
commit
9750592ee9
1 changed files with 10 additions and 2 deletions
|
|
@ -24,17 +24,20 @@ export class GoogleGemini {
|
||||||
model = '';
|
model = '';
|
||||||
system_instruction = '';
|
system_instruction = '';
|
||||||
stream = false;
|
stream = false;
|
||||||
|
thinkingBudget = 0; //Off
|
||||||
|
|
||||||
constructor({
|
constructor({
|
||||||
apiKey = '',
|
apiKey = '',
|
||||||
model = '',
|
model = '',
|
||||||
system_instruction = '',
|
system_instruction = '',
|
||||||
stream = false
|
stream = false,
|
||||||
|
thinkingBudget = 0
|
||||||
} = {}) {
|
} = {}) {
|
||||||
this.apiKey = apiKey;
|
this.apiKey = apiKey;
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.system_instruction = system_instruction;
|
this.system_instruction = system_instruction;
|
||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
|
this.thinkingBudget = thinkingBudget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -88,7 +91,12 @@ export class GoogleGemini {
|
||||||
parts:{
|
parts:{
|
||||||
text: this.system_instruction
|
text: this.system_instruction
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
google_gemini_body.generationConfig = {
|
||||||
|
thinkingConfig: {
|
||||||
|
thinkingBudget: this.thinkingBudget,
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log("[ThunderAI] Google Gemini API request: " + JSON.stringify(google_gemini_body));
|
// console.log("[ThunderAI] Google Gemini API request: " + JSON.stringify(google_gemini_body));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue