From 16d374046ee818dbad6435250c6361f040d6f877 Mon Sep 17 00:00:00 2001 From: Mic Date: Tue, 22 Apr 2025 00:11:00 +0200 Subject: [PATCH] Add Ollama context token preferences to options and UI. see #351 --- _locales/en/messages.json | 8 ++++++++ options/mzta-options-default.js | 1 + options/mzta-options.html | 11 +++++++++++ 3 files changed, 20 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 48b6b602..01f9a265 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1274,5 +1274,13 @@ "Replace_No_Selected_Text": { "message": "No text selected, would you like to insert the AI's response at the beginning of the email?", "description": "" + }, + "prefs_ollama_num_ctx": { + "message": "Number of context tokens", + "description": "" + }, + "prefs_ollama_num_ctx_Info": { + "message": "The number of context tokens to use for the Ollama API. Set to 0 if you don't want to pass it as a parameter to the server.", + "description": "" } } \ No newline at end of file diff --git a/options/mzta-options-default.js b/options/mzta-options-default.js index 573d2085..47cb2314 100644 --- a/options/mzta-options-default.js +++ b/options/mzta-options-default.js @@ -30,6 +30,7 @@ export const prefs_default = { chatgpt_developer_messages: '', ollama_host: '', ollama_model: '', + ollama_num_ctx: 0, openai_comp_host: '', // For OpenAI Compatible API as LM-Studio openai_comp_model: '', openai_comp_api_key: '', diff --git a/options/mzta-options.html b/options/mzta-options.html index cd835aab..9083d20c 100644 --- a/options/mzta-options.html +++ b/options/mzta-options.html @@ -250,6 +250,17 @@

+ + + + + +