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".
This commit is contained in:
Juha Jeronen 2024-02-07 23:29:32 +02:00
parent 58c3d3eb7f
commit 2dcb490e43
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}