google gemini system instructions added to the addon options page. see #217
This commit is contained in:
parent
dd48751adb
commit
c65d29a918
4 changed files with 27 additions and 1 deletions
|
|
@ -930,5 +930,13 @@
|
|||
"google_gemini_empty_model": {
|
||||
"message": "You've not choosen a model for the Google Gemini API. Please choose one in the options page.",
|
||||
"description": ""
|
||||
},
|
||||
"GoogleGemini_SystemInstruction": {
|
||||
"message": "System Instruction",
|
||||
"description": ""
|
||||
},
|
||||
"GoogleGemini_SystemInstruction_Info": {
|
||||
"message": "When you set a system instruction, you give the model additional context to understand the task, provide more customized responses, and adhere to specific guidelines over the prompt that will be sent.",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -35,6 +35,7 @@ export const prefs_default = {
|
|||
openai_comp_chat_name: 'OpenAI Comp',
|
||||
google_gemini_api_key: '',
|
||||
google_gemini_model: '',
|
||||
google_gemini_system_instruction: '',
|
||||
dynamic_menu_force_enter: false,
|
||||
dynamic_menu_order_alphabet: true,
|
||||
placeholders_use_default_value: false,
|
||||
|
|
|
|||
|
|
@ -202,6 +202,19 @@
|
|||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="conntype_google_gemini_api">
|
||||
<td>
|
||||
<label>
|
||||
<span>__MSG_GoogleGemini_SystemInstruction__</span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>
|
||||
<textarea id="google_gemini_system_instruction" name="google_gemini_system_instruction" class="option-input"></textarea>
|
||||
<br>__MSG_GoogleGemini_SystemInstruction_Info__
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="conntype_ollama_api">
|
||||
<td><label>
|
||||
<span>__MSG_prefs_API_Host__</span>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ function saveOptions(e) {
|
|||
default:
|
||||
if (element.tagName === 'SELECT') {
|
||||
options[element.id] = element.value;
|
||||
}else{
|
||||
} else if (element.tagName === 'TEXTAREA') {
|
||||
options[element.id] = element.value.trim();
|
||||
} else {
|
||||
console.error("[ThunderAI] Unhandled input type:", element.type);
|
||||
}
|
||||
}
|
||||
|
|
@ -82,6 +84,8 @@ async function restoreOptions() {
|
|||
if (element.value === '') {
|
||||
element.selectedIndex = -1;
|
||||
}
|
||||
} else if (element.tagName === 'TEXTAREA') {
|
||||
element.value = result[element.id];
|
||||
}else{
|
||||
console.error("[ThunderAI] Unhandled input type:", element.type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue