fixed chatgpt_store and chatgpt_temperature var names

This commit is contained in:
mic 2025-12-29 22:02:33 +01:00
parent a436bd16b2
commit 5893ee668c
2 changed files with 9 additions and 9 deletions

View file

@ -80,8 +80,8 @@ switch (llm) {
chatgpt_api_key: prefs_default.chatgpt_api_key,
chatgpt_model: prefs_default.chatgpt_model,
chatgpt_developer_messages: prefs_default.chatgpt_developer_messages,
chatgpt_api_store: prefs_default.chatgpt_api_store, // Keep as boolean
chatgpt_api_temperature: prefs_default.chatgpt_api_temperature,
chatgpt_store: prefs_default.chatgpt_store, // Keep as boolean
chatgpt_temperature: prefs_default.chatgpt_temperature,
do_debug: prefs_default.do_debug,
});
let i18nStrings = {};
@ -94,19 +94,19 @@ switch (llm) {
chatgpt_api_key: prefs_api.chatgpt_api_key,
chatgpt_model: prefs_api.chatgpt_model,
chatgpt_developer_messages: prefs_api.chatgpt_developer_messages,
chatgpt_api_store: prefs_api.chatgpt_api_store,
chatgpt_api_temperature: prefs_api.chatgpt_api_temperature,
chatgpt_store: prefs_api.chatgpt_store,
chatgpt_temperature: prefs_api.chatgpt_temperature,
do_debug: prefs_api.do_debug,
i18nStrings: i18nStrings,
});
let additional_text_elements = [];
additional_text_elements.push({label: browser.i18n.getMessage("prompt_string"), value: '[' + prompt_id + '] ' + decodeURIComponent(prompt_name)});
additional_text_elements.push({label: 'OpenAI Store', value: (prefs_api.chatgpt_api_store ? 'Yes' : 'No')});
additional_text_elements.push({label: 'OpenAI Store', value: (prefs_api.chatgpt_store ? 'Yes' : 'No')});
if(prefs_api.chatgpt_developer_messages && prefs_api.chatgpt_developer_messages.length > 0) {
additional_text_elements.push({label: browser.i18n.getMessage("ChatGPT_Developer_Messages"), value: prefs_api.chatgpt_developer_messages});
}
if(prefs_api.chatgpt_api_temperature && prefs_api.chatgpt_api_temperature.length > 0){
additional_text_elements.push({label: browser.i18n.getMessage("prefs_api_temperature"), value: prefs_api.chatgpt_api_temperature});
if(prefs_api.chatgpt_temperature && prefs_api.chatgpt_temperature.length > 0){
additional_text_elements.push({label: browser.i18n.getMessage("prefs_api_temperature"), value: prefs_api.chatgpt_temperature});
}
messagesArea.appendUserMessage(getAPIsInitMessageString({
api_string: "ChatGPT API",

View file

@ -165,7 +165,7 @@ export async function injectConnectionUI({
</td>
<td>
<label>
<input type="text" id="${modelId_prefix ? `${modelId_prefix}` : ''}chatgpt_api_temperature" name="${modelId_prefix ? `${modelId_prefix}` : ''}chatgpt_api_temperature" class="option-input option-input-specific" />
<input type="text" id="${modelId_prefix ? `${modelId_prefix}` : ''}chatgpt_temperature" name="${modelId_prefix ? `${modelId_prefix}` : ''}chatgpt_temperature" class="option-input option-input-specific" />
<br>__MSG_prefs_chatgpt_api_temperature_Info__
</label>
</td>
@ -178,7 +178,7 @@ export async function injectConnectionUI({
</td>
<td>
<label>
<input type="checkbox" id="${modelId_prefix ? `${modelId_prefix}` : ''}chatgpt_api_store" name="${modelId_prefix ? `${modelId_prefix}` : ''}chatgpt_api_store" class="option-input" />
<input type="checkbox" id="${modelId_prefix ? `${modelId_prefix}` : ''}chatgpt_store" name="${modelId_prefix ? `${modelId_prefix}` : ''}chatgpt_store" class="option-input" />
&nbsp;<span>__MSG_ChatGPT_chatgpt_api_store_info__</span>
</label>
</td>