JanitorAI - Dynamic Character Avatars

Logs the last bot message and shows an emotion-based avatar. Completly customizable.

作者
ZephyrThePink
日安装量
1
总安装量
4
评分
0 0 0
版本
1.7
创建于
2025-07-17
更新于
2025-07-17
大小
35.3 KB
许可证
MIT
适用于

JanitorAI - Dynamic Character Avatars

Overview

This Tampermonkey userscript adds dynamic, emotion-based avatars to JanitorAI chats. It analyzes the bot's last message and displays a character avatar that matches the detected emotion, making conversations more expressive and visually engaging.

Features

  • Automatic Emotion Detection: Uses Google Gemini API to analyze the bot's last message and determine the displayed emotion.
  • Dynamic Avatars: Shows a customizable avatar for each emotion and character.
  • Draggable & Resizable: Avatars can be moved and resized on the screen.
  • Mobile & Desktop Support: Works on both desktop and mobile browsers.
  • Customizable: Easily add or change characters and emotion images.

Setup Instructions

  1. Get a Gemini API Key:
  2. Configure the Script:
    • Open Tampermonkey dashboard, find the script, and click "Edit".
    • In Section 2 of the script, replace YOUR_OWN_API_KEY with your Gemini API key.
    • (Optional) Change the model if needed (default: gemini-2.0-flash).
  3. Save and Reload JanitorAI:
    • Save the script and reload your JanitorAI chat page. The avatar should appear when the bot sends a message.

Customization

Add or Change Emotions

  • In Section 1 of the script, you’ll find the characterEmotionAvatars object.
  • Each emotion is mapped to a number and an image URL.
  • To add new emotions:
    1. Add a new number and image URL to the character’s object.
    2. Update the emotion list in Section 5 (Gemini prompt) to match your changes.

Add More Characters

  • Add a new character to the characterEmotionAvatars object, using the same emotion number mapping.
  • Example: const characterEmotionAvatars = { Ashley: { ... }, Bob: { 1: "https://example.com/bob-happy.png", // Admiration 2: "https://example.com/bob-amused.png", // Amusement // ... add more emotions }, // Add more characters here }; - Make sure the emotion numbers and descriptions in the Gemini prompt (Section 5) match your avatar setup.

Tips

  • Only edit Sections 1, 2, and 5 for customization. Other sections are core logic.
  • If you add/remove emotions, always update the Gemini prompt so detection matches your avatars.
  • Avatars are draggable and resizable for convenience.

Support

For questions or help, you can contact me on discord (@xzeph__)

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址