From 2dcb490e43b43b4917606549bc6d94030aec496e Mon Sep 17 00:00:00 2001 From: Juha Jeronen Date: Wed, 7 Feb 2024 23:29:32 +0200 Subject: [PATCH] add {{model}} substitution macro to get name of current LLM This is useful in the character card for an AI assistant, see #1774. Tested with the Textgen backend, but should work with others too. Horde will show only "Connected", and Novel will show the tier, but Kobold and Textgen will show the model name. If not connected, on any backend, will show "no_connection". --- public/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/script.js b/public/script.js index 908714892..8d3a5e489 100644 --- a/public/script.js +++ b/public/script.js @@ -2179,6 +2179,7 @@ function substituteParams(content, _name1, _name2, _original, _group, _replaceCh environment.user = _name1 ?? name1; environment.char = _name2 ?? name2; environment.group = environment.charIfNotGroup = _group ?? name2; + environment.model = online_status; return evaluateMacros(content, environment); }