Please or Register to create posts and topics.

Streamer.bot AI Twitch Chat Bot (Ollama Powered)

๐Ÿค– Streamer.bot AI Twitch Chat Bot (Ollama Powered)

A fully custom AI Twitch Chat Bot built for Streamer.bot that uses your local Ollama AI server instead of cloud APIs.

This bot responds like a real streamer, understands your channel context, and interacts naturally with chat.


๐Ÿš€ Features

  • ๐Ÿง  Uses Ollama (local AI) โ€” no OpenAI, Gemini, or paid APIs required

  • ๐ŸŽฎ Responds like a real Twitch streamer (not an AI assistant)

  • ๐Ÿ’ฌ Smart chat behavior:

    • No repetitive greetings

    • Matches chat energy

    • Natural, human-style replies

  • ๐Ÿ“… Uses real-time data:

    • Stream title

    • Current game

    • Channel description

    • Date & time (actionQueuedAt)

  • ๐Ÿ‘ค Viewer awareness:

    • Detects if user is following

    • Detects subscriber status

    • Affiliate / Partner awareness

  • ๐Ÿ“ข Auto follow reminder:

    • If viewer is NOT following, bot adds:

      “i see you are not following me yet dont forget to hit that follow button”

  • โœ‚๏ธ Auto message splitting:

    • Splits long responses into 500 character chunks

  • ๐Ÿงพ Chat memory:

    • Tracks users for 20 minutes to avoid spammy greetings


๐Ÿ–ฅ Requirements

ollama run gemma2:9b

โš™๏ธ Setup

1. Install Ollama Model

Example:

ollama pull gemma2:9b

2. Set Ollama URL in Streamer.bot

Default used in script:

http://192.168.2.58:11434/v1

Change this if needed using argument:

ollamaBaseUrl

3. Add C# Script to Streamer.bot

  • Create a new C# Inline Action

  • Paste the full script

  • Trigger it using:

    • Twitch Chat Message

    • or command (ex: @botname)


4. Required Arguments

Make sure these are available in your action:

message
userName
broadcastUserName
streamTitle
game

5. Optional / Advanced Arguments

targetIsAffiliate
targetIsPartner
targetIsFollowing
targetIsSubscribed
createdAt
actionQueuedAt

6. Channel Bio (Recommended)

Set once using:

CPH.SetGlobalVar("streamerChannelBio", "Your Twitch bio here", true);

๐Ÿ’ฌ Sending Split Messages

The script outputs:

aiResponse1
aiResponse2
aiResponse3
aiResponse4
aiResponse5
aiResponseCount

Example flow in Streamer.bot:

Send:

%aiResponse1%

Then add conditions:

If:

%aiResponseCount% >= 2

Send:

%aiResponse2%

Repeat for 3โ€“5.


๐Ÿง  Personality System

Default personality:

streamer

Set it using:

CPH.SetGlobalVar("smartbotPersonalityTwitch", "streamer", true);

Behavior:

  • Talks like a real streamer

  • No โ€œAI assistantโ€ language

  • No โ€œHow can I help you?โ€

  • No robotic responses


๐Ÿ”ฅ Smart Behavior

๐Ÿ‘‹ Greeting Logic

  • First message in 20 mins โ†’ small greeting allowed

  • Same user chatting โ†’ no repeated greetings


๐Ÿ“ข Follow Reminder

Only triggers if:

targetIsFollowing == false

๐Ÿงพ Chat Awareness

  • Tracks recent users (20 min window)

  • Prevents spammy repeated intros


๐Ÿ“… Time Awareness

Uses:

actionQueuedAt

Example AI awareness:

  • “late night stream vibes”

  • “weekend grind”

  • “yo it’s already March??”


๐Ÿงช Example Output

User:

@bot what game is this?

Bot:

@user yo this is some chaos right now ๐Ÿ˜‚ been grinding this all stream

(Not robotic, no AI mention, fully natural)


โš ๏ธ Notes

  • This script uses HttpClient

  • If your Streamer.bot C# environment throws errors:

    • You may need an alternative HTTP method (PowerShell or external script)


๐Ÿš€ Future Upgrades (Ideas)

  • ๐ŸŽฏ Time-of-day mood system (morning/night energy)

  • ๐ŸŽฎ Game-specific personalities

  • ๐Ÿง  Chat memory summaries

  • ๐Ÿ”Š TTS integration

  • ๐ŸŽญ Dynamic streamer personality switching


๐Ÿ’œ Credits

Built for Streamer.bot users who want:

  • Full control

  • No API costs

  • Real streamer-style AI interaction


โญ If you like this

Give it a โญ on GitHub and share it with other streamers!

Uploaded files: