mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user