gemini thinking budget pref added to the options page. see #494
This commit is contained in:
parent
1bc111f96f
commit
7c68561901
3 changed files with 28 additions and 1 deletions
|
|
@ -1668,5 +1668,13 @@
|
||||||
"warn_API_needed": {
|
"warn_API_needed": {
|
||||||
"message": "To use this feature, you need an API integration rather than the ChatGPT Web Integration. You can define a specific API in the feature settings page by first checking the checkbox above and then clicking the button on the left.",
|
"message": "To use this feature, you need an API integration rather than the ChatGPT Web Integration. You can define a specific API in the feature settings page by first checking the checkbox above and then clicking the button on the left.",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"prefs_google_gemini_thinking_budget": {
|
||||||
|
"message": "Thinking Budget",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"prefs_google_gemini_thinking_budget_Info": {
|
||||||
|
"message": "Define the number of tokens to be used for thinking. Leave this field blank if the selected model does not support thinking or if you want to use the default method. Enter 0 to disable thinking, or -1 to enable dynamic thinking.",
|
||||||
|
"description": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ export const prefs_default = {
|
||||||
google_gemini_api_key: '',
|
google_gemini_api_key: '',
|
||||||
google_gemini_model: '',
|
google_gemini_model: '',
|
||||||
google_gemini_system_instruction: '',
|
google_gemini_system_instruction: '',
|
||||||
|
google_gemini_thinking_budget: '',
|
||||||
anthropic_api_key: '',
|
anthropic_api_key: '',
|
||||||
anthropic_model: '',
|
anthropic_model: '',
|
||||||
anthropic_version: '2023-06-01',
|
anthropic_version: '2023-06-01',
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,11 @@ import { Ollama } from '../../js/api/ollama.js';
|
||||||
import { OpenAIComp } from '../../js/api/openai_comp.js'
|
import { OpenAIComp } from '../../js/api/openai_comp.js'
|
||||||
import { GoogleGemini } from '../../js/api/google_gemini.js';
|
import { GoogleGemini } from '../../js/api/google_gemini.js';
|
||||||
import { Anthropic } from '../../js/api/anthropic.js';
|
import { Anthropic } from '../../js/api/anthropic.js';
|
||||||
import { validateCustomData_ChatGPTWeb, sanitizeChatGPTModelData, sanitizeChatGPTWebCustomData } from '../../js/mzta-utils.js';
|
import {
|
||||||
|
validateCustomData_ChatGPTWeb,
|
||||||
|
sanitizeChatGPTModelData,
|
||||||
|
sanitizeChatGPTWebCustomData
|
||||||
|
} from '../../js/mzta-utils.js';
|
||||||
import { openAICompConfigs } from '../../js/api/openai_comp_configs.js';
|
import { openAICompConfigs } from '../../js/api/openai_comp_configs.js';
|
||||||
|
|
||||||
export const varConnectionUI = {
|
export const varConnectionUI = {
|
||||||
|
|
@ -204,6 +208,20 @@ export async function injectConnectionUI({
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="conntype_google_gemini_api${tr_class ? ` ${tr_class}` : ''}">
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<span class="opt_title">__MSG_prefs_google_gemini_thinking_budget__</span>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input type="text" id="google_gemini_thinking_budget" name="google_gemini_thinking_budget" class="option-input"/>
|
||||||
|
<br>__MSG_prefs_google_gemini_thinking_budget_Info__
|
||||||
|
<br><a href="https://ai.google.dev/gemini-api/docs/thinking#set-budget">__MSG_more_info_string__</a>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr class="conntype_google_gemini_api${tr_class ? ` ${tr_class}` : ''}">
|
<tr class="conntype_google_gemini_api${tr_class ? ` ${tr_class}` : ''}">
|
||||||
<td>
|
<td>
|
||||||
<label>
|
<label>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue