mzta_specialCommand has now a custom_model parameter. see #438
This commit is contained in:
parent
9967e28861
commit
9681a938e3
1 changed files with 8 additions and 5 deletions
|
|
@ -26,6 +26,7 @@
|
|||
prompt = "";
|
||||
worker = null;
|
||||
llm = "";
|
||||
custom_model = "";
|
||||
full_message = "";
|
||||
logger = null;
|
||||
do_debug = false;
|
||||
|
|
@ -34,10 +35,12 @@
|
|||
let {
|
||||
prompt = '',
|
||||
llm = '',
|
||||
custom_model = '',
|
||||
do_debug = false
|
||||
} = args;
|
||||
this.prompt = prompt;
|
||||
this.llm = llm;
|
||||
this.custom_model = custom_model;
|
||||
this.logger = new taLogger('mzta_specialCommand', do_debug);
|
||||
this.do_debug = do_debug;
|
||||
switch (this.llm) {
|
||||
|
|
@ -73,7 +76,7 @@
|
|||
this.worker.postMessage({
|
||||
type: 'init',
|
||||
chatgpt_api_key: prefs_api.chatgpt_api_key,
|
||||
chatgpt_model: prefs_api.chatgpt_model,
|
||||
chatgpt_model: this.custom_model != '' ? this.custom_model : prefs_api.chatgpt_model,
|
||||
chatgpt_developer_messages: prefs_api.chatgpt_developer_messages,
|
||||
do_debug: this.do_debug,
|
||||
i18nStrings: ''
|
||||
|
|
@ -89,7 +92,7 @@
|
|||
this.worker.postMessage({
|
||||
type: 'init',
|
||||
google_gemini_api_key: prefs_api.google_gemini_api_key,
|
||||
google_gemini_model: prefs_api.google_gemini_model,
|
||||
google_gemini_model: this.custom_model != '' ? this.custom_model : prefs_api.google_gemini_model,
|
||||
google_gemini_system_instruction: prefs_api.google_gemini_system_instruction,
|
||||
do_debug: this.do_debug,
|
||||
i18nStrings: ''
|
||||
|
|
@ -104,7 +107,7 @@
|
|||
this.worker.postMessage({
|
||||
type: 'init',
|
||||
ollama_host: prefs_api.ollama_host,
|
||||
ollama_model: prefs_api.ollama_model,
|
||||
ollama_model: this.custom_model != '' ? this.custom_model : prefs_api.ollama_model,
|
||||
do_debug: this.do_debug,
|
||||
i18nStrings: ''
|
||||
});
|
||||
|
|
@ -121,7 +124,7 @@
|
|||
this.worker.postMessage({
|
||||
type: 'init',
|
||||
openai_comp_host: prefs_api.openai_comp_host,
|
||||
openai_comp_model: prefs_api.openai_comp_model,
|
||||
openai_comp_model: this.custom_model != '' ? this.custom_model : prefs_api.openai_comp_model,
|
||||
openai_comp_api_key: prefs_api.openai_comp_api_key,
|
||||
openai_comp_use_v1: prefs_api.openai_comp_use_v1,
|
||||
do_debug: this.do_debug,
|
||||
|
|
@ -139,7 +142,7 @@
|
|||
this.worker.postMessage({
|
||||
type: 'init',
|
||||
anthropic_api_key: prefs_api.anthropic_api_key,
|
||||
anthropic_model: prefs_api.anthropic_model,
|
||||
anthropic_model: this.custom_model != '' ? this.custom_model : prefs_api.anthropic_model,
|
||||
anthropic_version: prefs_api.anthropic_version,
|
||||
anthropic_max_tokens: prefs_api.anthropic_max_tokens,
|
||||
do_debug: this.do_debug,
|
||||
|
|
|
|||
Loading…
Reference in a new issue