Introduces a no-op API selection to disable expression classification
Shows warnings when no valid API is selected to prevent silent failures
Updates migration logic and settings UI to use new default value
This allows users to explicitly opt-out of automatic expression detection
while maintaining backwards compatibility with existing configurations
- Functionality only available for LLM/webLLM
- New toggle to filter expressions on availalbe sprites
- `getExpressionsList` filters cached expressions when checked (using sprite folder name/override)
- `/expression-list` slash command has "filter" arg to filter list
- `/expression-classify` slash command has "filter" arg now, to use filtered list for classification
- `getExpressionLabel` uses filtered expressions when LLM/webLLM
- Move "use default emojis" from its own toggle into the fallback dropdown
- Add "no fallback" to the fallback dropdown
- fix fallback expressions not being consistently used
- Switching fallback will now reroll/reset the relevant expression
- Add html attributes on the expression image
Rather than using a separate BERT model to classify the last message,
use the LLM itself to get the classified expression label as a JSON
and set that as the current sprite. Doing this should take more information
into consideration and cut down on extra processing.
This is made possible by the use of constrained generation with JSON
schemas. Only available to TabbyAPI since it's the only backend that
supports the use of JSON schemas, but there can hopefully be a way
to use this with other backends as well.
Intercepts the generation and sets top_k = 1 (for greedy sampling)
and the json_schema to an emotion enum. Doing this also prevents
reingestion of the entire context every time a message is sent and
then asked to be classified, which doesn't compromise the chat
experience.
Signed-off-by: kingbri <bdashore3@proton.me>