From 4f7a018f674f5b37d9b0e5f2a2d35debd2f9a5e6 Mon Sep 17 00:00:00 2001 From: mic Date: Tue, 20 Aug 2024 15:16:48 +0200 Subject: [PATCH] ollama options added. see #79 --- _locales/de/messages.json | 2 +- _locales/en/messages.json | 22 +++++++++++++++++++++- _locales/fr/messages.json | 2 +- _locales/it/messages.json | 2 +- options/mzta-options-default.js | 4 +++- options/mzta-options.css | 4 ++++ options/mzta-options.html | 28 +++++++++++++++++++++++++++- options/mzta-options.js | 12 +++++++++++- 8 files changed, 69 insertions(+), 7 deletions(-) diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 7f63734c..f6a5965b 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -411,7 +411,7 @@ "message": "Fehler beim Abrufen der ChatGPT-Modelle", "description": "" }, - "ChatGPT_Models_Loading": { + "Loading": { "message": "Laden...", "description": "" }, diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 71df925d..93e0555e 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -411,7 +411,7 @@ "message": "Error trying to fetch ChatGPT models", "description": "" }, - "ChatGPT_Models_Loading": { + "Loading": { "message": "Loading...", "description": "" }, @@ -442,5 +442,25 @@ "prefs_OptionText_do_debug_info": { "message": "Activate the debug system", "description": "" + }, + "prefs_Connection_type_Ollama_API": { + "message": "Ollama API (Local LLM)", + "description": "" + }, + "prefs_Ollama_Host": { + "message": "Host Address", + "description": "" + }, + "Ollama_Models": { + "message": "Ollama Models", + "description": "" + }, + "Ollama_Models_Fetch": { + "message": "Update Ollama Models list", + "description": "" + }, + "Ollama_Models_Error_fetching": { + "message": "Error trying to fetch Ollama models", + "description": "" } } \ No newline at end of file diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 31b811b7..1e7d95bb 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -411,7 +411,7 @@ "message": "Erreur lors de la récupération des modèles ChatGPT", "description": "" }, - "ChatGPT_Models_Loading": { + "Loading": { "message": "Chargement...", "description": "" }, diff --git a/_locales/it/messages.json b/_locales/it/messages.json index c1c362b4..744ffccd 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -411,7 +411,7 @@ "message": "Errore durante il recupero dei modelli di ChatGPT", "description": "" }, - "ChatGPT_Models_Loading": { + "Loading": { "message": "Caricamento in corso...", "description": "" }, diff --git a/options/mzta-options-default.js b/options/mzta-options-default.js index acbd7042..f3826da0 100644 --- a/options/mzta-options-default.js +++ b/options/mzta-options-default.js @@ -22,7 +22,9 @@ export const prefs_default = { chatgpt_win_width: 700, chatpgt_use_gpt4: false, default_chatgpt_lang: '', - connection_type: 'chatgpt_web', //Other values: 'chatgpt_api' + connection_type: 'chatgpt_web', //Other values: 'chatgpt_api', 'ollama_api' chatgpt_api_key: '', chatgpt_model: '', + ollama_host: '', + ollama_model: '', } \ No newline at end of file diff --git a/options/mzta-options.css b/options/mzta-options.css index 646705fa..572fdd05 100644 --- a/options/mzta-options.css +++ b/options/mzta-options.css @@ -126,6 +126,10 @@ tr.conntype_chatgpt_web, tr.conntype_chatgpt_web2{ background-color: rgb(39, 11, 0); } + tr.conntype_ollama_api, tr.conntype_ollama_api2{ + background-color: rgb(7, 58, 0); + } + /* color to be used for a local LLM .conntype_chatgpt_web,.conntype_local_llm{ background-color: rgb(0, 39, 0); diff --git a/options/mzta-options.html b/options/mzta-options.html index 4f1dbefb..2141c0e8 100644 --- a/options/mzta-options.html +++ b/options/mzta-options.html @@ -70,6 +70,7 @@ @@ -104,13 +105,38 @@ - __MSG_ChatGPT_Models_Loading__
+ __MSG_Loading__
+ + + + + + + + + + + + __MSG_Loading__
+ + +