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.
-
🧠 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
- Streamer.bot
- Ollama
- A local model installed (example):
ollama run gemma2:9bExample:
ollama pull gemma2:9bDefault used in script:
http://192.168.2.58:11434/v1
Change this if needed using argument:
ollamaBaseUrl
-
Create a new C# Inline Action
-
Paste the full script
-
Trigger it using:
- Twitch Chat Message
- or command (ex:
@botname)
Make sure these are available in your action:
message
userName
broadcastUserName
streamTitle
game
targetIsAffiliate
targetIsPartner
targetIsFollowing
targetIsSubscribed
createdAt
actionQueuedAt
Set once using:
CPH.SetGlobalVar("streamerChannelBio", "Your Twitch bio here", true);The script outputs:
aiResponse1
aiResponse2
aiResponse3
aiResponse4
aiResponse5
aiResponseCount
Send:
%aiResponse1%
Then add conditions:
If:
%aiResponseCount% >= 2
Send:
%aiResponse2%
Repeat for 3–5.
Default personality:
streamer
Set it using:
CPH.SetGlobalVar("smartbotPersonalityTwitch", "streamer", true);- Talks like a real streamer
- No “AI assistant” language
- No “How can I help you?”
- No robotic responses
- First message in 20 mins → small greeting allowed
- Same user chatting → no repeated greetings
Only triggers if:
targetIsFollowing == false
- Tracks recent users (20 min window)
- Prevents spammy repeated intros
Uses:
actionQueuedAt
Example AI awareness:
- "late night stream vibes"
- "weekend grind"
- "yo it's already March??"
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)
-
This script uses
HttpClient -
If your Streamer.bot C# environment throws errors:
- You may need an alternative HTTP method (PowerShell or external script)
- 🎯 Time-of-day mood system (morning/night energy)
- 🎮 Game-specific personalities
- 🧠 Chat memory summaries
- 🔊 TTS integration
- 🎭 Dynamic streamer personality switching
Built for Streamer.bot users who want:
- Full control
- No API costs
- Real streamer-style AI interaction
Give it a ⭐ on GitHub and share it with other streamers!