Add an endpoint to replace the avatar of a character.
Needed for SillyTavern-AnotherCharManager extension in order to use the avatar replacement feature.
-
Before you begin, make sure you set a config
enableServerPlugins
totrue
in the config.yaml file of SillyTavern. -
Open a terminal in your SillyTavern directory, then run the following:
cd plugins
git clone https://github.com/sakhavhyand/SillyTavern-AvatarEdit
- Restart the SillyTavern server.
/api/plugins/avataredit/edit-avatar
OR
/api/plugins/avataredit/edit-avatar?crop={cropdata}
FORMDATA
{
'avatar': FILE,
'avatar_url': 'default_FluxTheCat.png'
}
-> Code 200