PNGTuber-GPT Documentation

website·Indexed 31 days ago

https://pngtubergpt.com

A custom C# action for Streamer.bot and Speaker.bot that adds a GPT-based PNGTuber to a stream. The documentation covers installation, connecting to Twitch, configuring OpenAI API keys for ChatGPT 3.5 Turbo, setting up Google Cloud Text-to-Speech, creating GPT lore files for bot personality, and routing audio through Veadotube Mini.

Tokens
18.2K
Snippets
49
Records
137
Agent score
47%

What's inside PNGTuber-GPT

  1. Overview of the GPT-based PNGTuber system

    This system is a custom C# action for Streamer.bot and Speaker.bot designed to add an interactive, GPT-powered PNGTuber to a live stream. The bot connects to Twitch Chat, allowing viewers to use channel points or bits to ask questions. These prompts are sent to ChatGPT, which generates an in-character response based on a provided lore file and specific parameters (such as response length and creativity level). To ensure safety, the bot utilizes the OpenAI moderation endpoint to filter hate or harmful prompts. Additionally, the bot can maintain a database of user-specific information that can be 'trained' via points or bits and referenced when those users are mentioned.
  2. Overview of PNGTuberGPT functionality

    PNGTuberGPT is a custom C# action designed for Streamer.bot and Speaker.bot. It allows streamers to integrate a GPT-based PNGTuber that interacts with Twitch Chat. Users can trigger the bot via channel point redemptions or bits to ask questions. The bot uses a lore file for in-character responses, supports configurable response lengths and creativity levels, and utilizes OpenAI's moderation endpoint to filter harmful content. It also features a memory system to remember specific users when they are mentioned in prompts.
  3. Overview of PNGTuber-GPT for Twitch

    PNGTuber-GPT is an open-source tool (MIT license) that allows streamers to create an AI character for their Twitch channel. Powered by ChatGPT, the bot can interact with chat, learn from viewers, and be customized via context settings to adopt the channel's specific language and recognize users by nicknames. It also integrates with the Pronouns API to address viewers by their preferred pronouns.
  4. Overview of PNGTuberGPT functionality

    PNGTuberGPT is a custom C# action designed for Streamer.bot and Speaker.bot. It enables a GPT-based PNGTuber to interact with a Twitch stream by responding to channel point redemptions or bits. The system relays user prompts to ChatGPT, which generates an in-character response based on a provided lore file and specific parameters (such as response length and creativity/literalness). To ensure safety, the bot utilizes the OpenAI moderation endpoint to filter hate or harmful prompts. Additionally, the bot can maintain a database of user-specific information that can be 'trained' via points or bits and referenced when those users are mentioned.
  5. Get Speaker.bot system information

    Retrieve general information about the TwitchSpeaker instance or list available commands.
    !tts commands    # List all available custom commands
    !tts (about|aboot) # Send TwitchSpeaker instance information to chat
  6. Understand PngTuberGPT consumption costs

    The PngTuberGPT extension itself is free. However, users are responsible for consumption-based costs from OpenAI (for LLM queries) and Google Cloud (for Text-to-Speech). For reasonable usage, costs are estimated to be under $20 per month, even for streamers performing hundreds of queries.
  7. PNGTuber-GPT v1.1 Technical Changes

    Key technical updates in v1.1 include:

    • Node.js Removal: Node.js is no longer required. The bot now saves chat logs directly to memory using the native Streamer.bot API token. Users should delete message_log.json from the bot directory.
    • Memory Management: The bot now maintains two separate queues: the previous 20 chat messages and the last 5 question/answer pairs.
    • Response Constraints: The bot is configured to respond in less than 500 characters by automatically appending a constraint to the user prompt.
    • Persistence: A new SaveSettings action creates a settings.json file (encrypted via System.Security.dll) to persist settings across upgrades.
    • Startup: A new Startup action executes on each Streamer.bot run to re-enable all bot commands.
  8. Manage bot memory using the keyword database

    Because each request sent to ChatGPT is stateless and does not remember previous interactions, the bot uses a JSON-based keyword database to store persistent information about users or specific keywords. This allows the bot to 'remember' facts that are injected into the context of future requests. The database is stored in a file named keywords_context.json within the repository.
  9. Manage bot memory using the keyword database

    Because each request sent to ChatGPT is stateless and does not remember previous interactions, the bot uses a JSON-based keyword database to store persistent information about users or specific keywords. This allows the bot to 'remember' facts by referencing this database during context processing. The default implementation uses a file named keywords_context.json located in the repository.
  10. Understand PngTuberGPT chat context management

    PngTuberGPT automatically manages chat context by keeping only the last 20 messages. As new messages arrive, older ones are deleted. These 20 messages are automatically passed into the prompt to provide the bot with context of the current conversation.
  11. Manage bot memory using the keyword database

    Because each request to ChatGPT is stateless and does not remember previous interactions, the bot uses a JSON-based keyword database to store persistent information about users or specific keywords. This allows the bot to 'remember' facts by associating them with keywords in the context. The default implementation uses a file named keywords_context.json located in the repository.
  12. Understand PngTuberGPT consumption costs

    The PngTuberGPT extension is provided for free. However, users are responsible for consumption-based costs from two external providers for every query: OpenAI (for text generation) and Google Cloud (for Text-to-Speech). For reasonable usage, costs are estimated to be under $20 per month.