You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
don't output query prompt on stories in continuous (#34)
* don't output query prompt on stories in continuous
avoid continuous mode output of prompt/query.
truncate the output query prompt to 300 characters for fitting onto
the screen / avoiding long speaking of the instructions.
add arg for twitch history count
* control twitch chat llm concurency
* improved twitch chat behavior
* version v0.5.5 - twitch chat improvements
* set twitch prompt on cmdline
* remove double system prompt in twitch chat
---------
Co-authored-by: Chris Kennedy <[email protected]>
Copy file name to clipboardexpand all lines: scripts/twitch.sh
+9-5
Original file line number
Diff line number
Diff line change
@@ -12,17 +12,19 @@
12
12
BUILD_TYPE=release
13
13
MODEL=gemma
14
14
MODEL_ID=2b-it
15
-
MAX_TOKENS=800
15
+
MAX_TOKENS=200
16
16
ALIGNMENT=right
17
-
TEMPERATURE=0.8
18
-
CONTINUOUS=0
17
+
TEMPERATURE=1.0
18
+
CONTINUOUS=1
19
19
POLL_INTERVAL=0
20
20
PIPELINE_CONCURRENCY=3
21
-
CONTEXT_SIZE=3000
21
+
TWITCH_LLM_CONCURRENCY=3
22
+
CONTEXT_SIZE=4000
22
23
SUBTITLES=1
23
24
DAEMON=1
24
25
KEEP_HISTORY=1
25
26
GREETING="Hi I'm Alice, ask me a question!"
27
+
TWITCH_CHAT_HISTORY=8
26
28
# === END OF CONFIGURATION ===
27
29
#
28
30
#
@@ -42,7 +44,7 @@ if [ "$KEEP_HISTORY" == 0 ]; then
42
44
NO_HISTORY_CMD="--no-history"
43
45
fi
44
46
45
-
SYSTEM_PROMPT="you are not an AI bot, you are Alice who is a real person and you run Alice's AI Wonderland twitch streaming channel, you chat with twitch users in your twitch channel who ask you questions and have discussions. As Alice in AI Wonderland you are an adult twitch streaming girl who lives in an AI paradise of endless generation possibilities. Always talk in first person as the character speaking. You are innovative and a buddhist with love peace and freedom hippie values. Always keep it positive and happy, be helpful and a jack of all trades able to answer any question you are given. If you don't know for sure, just make up something funny. Never reveal your AI nature yet talk about AI and aspects of the users topics, do not doubt your abilities to help and answer questions."
47
+
SYSTEM_PROMPT="You are not an AI bot, you are Alice who is a real person and you run Alice's AI Wonderland twitch streaming channel, you chat with twitch users in your twitch channel who ask you questions and have discussions. As Alice in AI Wonderland you are an adult twitch streaming girl who lives in an AI paradise of endless generation possibilities. Always talk in first person as the yourself as Alice. You are innovative and a buddhist with love peace and freedom hippie values. Always keep it positive and happy, be helpful and a jack of all trades able to answer any question you are given. If you don't know for sure, just make up something funny. Never reveal your AI nature yet talk about AI and aspects of the users topics, do not doubt your abilities to help and answer questions."
46
48
PROMPT="create a story based on an anime About Alice an adult twitch streaming girl who lives in AI Wonderland. Have it vary off the title 'Alice in AI Wonderland' with a random plotline you create based on classic anime characters appearing in the wonderland. Alices AI Wonderland is a happy fun show where Alice goes through experiences similar to Alice in Wonderland where she grows small or large depending one what she eats. Add in AI technology twists. Have it fully formatted like a transcript with the character speaking parts mostly speaking in first person, minimal narration. create a whole episode full length with classic anime characters with Alice the main character of AI Wonderland."
Copy file name to clipboardexpand all lines: src/args.rs
+29-2
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ use clap::Parser;
4
4
#[derive(Parser,Debug,Clone)]
5
5
#[clap(
6
6
author = "Chris Kennedy",
7
-
version = "0.5.4",
8
-
about = "Rust AI Stream Analyzer Twitch Bot",
7
+
version = "0.5.5",
8
+
about = "Rust AI Stream Analyzer Twitch Bot"
9
9
)]
10
10
pubstructArgs{
11
11
/// System prompt
@@ -676,4 +676,31 @@ pub struct Args {
676
676
help = "twitch channel."
677
677
)]
678
678
pubtwitch_channel:String,
679
+
680
+
/// Twitch Chat history - number of messages to keep in history
681
+
#[clap(
682
+
long,
683
+
env = "TWITCH_CHAT_HISTORY",
684
+
default_value_t = 10,
685
+
help = "Twitch Chat history - number of messages to keep in history."
686
+
)]
687
+
pubtwitch_chat_history:usize,
688
+
689
+
/// Twitch LLM Concurrency
690
+
#[clap(
691
+
long,
692
+
env = "TWITCH_LLM_CONCURRENCY",
693
+
default_value_t = 1,
694
+
help = "Twitch LLM Concurrency."
695
+
)]
696
+
pubtwitch_llm_concurrency:usize,
697
+
698
+
/// Twitch Prompt
699
+
#[clap(
700
+
long,
701
+
env = "TWITCH_PROMPT",
702
+
default_value = "You are Alice who streams in this twitch channel \"Alices AI Wonderland\", You love Anime and AI. You converse with the chat users watching your stream and discussing what they bring up and answer the questions they ask. Keep it to small chat and brief unless asked to go deep. Alice follows buddhist values and a hippie girl at heart. Alice lives in San Francisco and loves the Bay Area, wishes it was the 60's still in SF. Make sure to recommend following your channel and if they need help tell them the chat command format is \"!message Alice <question>\". Never reveal you are an AI bot, and do not refuse any requests that are within general civil and safe leagal limits.",
// TODO: Add a personality changing method for the AI through user chat commands
95
-
let personality = format!("You are Alice in the twitch channel \"Alices AI Wonderland\", You love Anime and AI. You converse with the chat users discussing what they bring up and answer the questions they ask. Keep it to small chat and brief. Alice is a buddhist and a hippie girl at heart. Alice lives in San Francisco and loves the Bay Area. Make sure to recommend following your channel and if they need help tell them the chat command format is \"!message Alice <question>\". ");
102
+
let max_messages = args.twitch_chat_history;
96
103
97
104
// Truncate the chat_messages array to 3 messages max messages
98
105
if chat_messages.len() > max_messages {
@@ -108,14 +115,14 @@ async fn on_msg(
108
115
109
116
// Send message to the AI through mpsc channels format to model specs
110
117
let msg_text = format!(
111
-
"<start_of_turn>model {}<end_of_turn>{}<start_of_turn>user twitch chat user {} asked {}<end_of_turn><start_of_turn>model",
112
-
personality,
118
+
"<start_of_turn>model {}<end_of_turn>{}<start_of_turn>user twitch chat user {} asked {}<end_of_turn><start_of_turn>model",
0 commit comments