mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 13:38:49 +01: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:
parent
58c3d3eb7f
commit
2dcb490e43
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user