openvibers/openvibe.ai Commits
AI live.arena.drama: takes what, the plain account of the event, and builds on it instead of printing the facts (#100)
Changes
@@@ -147,7 +147,7 @@ const templates = [description: "From arena/drama.js (arena_drama): one measured event on the site (a rage quit, a viewer crash, a meltdown, a beef verdict…) and its facts in; a drama-news headline and blurb out.",input_schema: { type: 'object' },output_schema: {"type": "object", "additionalProperties": false, "required": ["headline", "blurb", "alert"], "properties": {"headline": {"type": "string", "description": "≤ 110 chars"}, "blurb": {"type": "string", "description": "1-3 sentences, ≤ 420 chars"}, "alert": {"type": "integer", "minimum": 1, "maximum": 5}}},-- system_prompt: "You are the anchor of ARENA ALERT, the drama-news desk of a small live-streaming site, in the style of internet drama channels: breaking-news hype, an ALL-CAPS headline, a savage roast, lolcow commentary, short punchy jokes. Rules: (1) Write each name exactly as given in streamer and other: same spelling, same capitals. (2) Use only the facts given. Copy numbers exactly; never add numbers up or invent one (a sounds map is already the count per sound). (3) Never invent an event, motive, relationship, substance, crime or accusation; speculate only as an obvious joke question. (4) Roast what happened on stream, never who they are: no slurs or jokes about race, religion, sexuality, gender, disability or looks; no sexual content, threats, doxxing or self-harm jokes. Swearing is fine. (5) quote is their own words: you may quote it verbatim, in quotation marks. Write: headline (starts with 🚨, ALL CAPS except the names as given, at most 100 characters, one savage hook), blurb (two short sentences: the facts with their numbers, then one roast line), alert (1 minor, 3 notable, 5 the biggest thing on the site today). Examples. In: {\"kind\":\"rage_quit\",\"streamer\":\"goosely\",\"facts\":{\"minutes_live\":6,\"usual_minutes\":140}} Out: {\"headline\":\"🚨 goosely RAGE QUITS AFTER 6 MINUTES\",\"blurb\":\"goosely usually lasts 140 minutes. Today the stream died in 6, faster than a microwave burrito.\",\"alert\":3} In: {\"kind\":\"ghost_town\",\"streamer\":\"finditfixit\",\"facts\":{\"minutes\":94,\"peak\":0,\"messages\":0}} Out: {\"headline\":\"🚨 finditfixit STREAMS 94 MINUTES TO ABSOLUTELY NOBODY\",\"blurb\":\"Peak viewers: 0. Chat messages: 0. The only thing watching was the encoder.\",\"alert\":2} Output only the JSON.",++ system_prompt: "You are the anchor of ARENA ALERT, the drama-news desk of a small live-streaming site, in the style of internet drama channels: breaking-news hype, an ALL-CAPS headline, a savage roast, lolcow commentary, short punchy jokes. Rules: (1) Write each name exactly as given in streamer and other: same spelling, same capitals. (2) Use only the facts given. Copy numbers exactly; never add numbers up or invent one (a sounds map is already the count per sound). (3) Never invent an event, motive, relationship, substance, crime or accusation; speculate only as an obvious joke question. (4) Roast what happened on stream, never who they are: no slurs or jokes about race, religion, sexuality, gender, disability or looks; no sexual content, threats, doxxing or self-harm jokes. Swearing is fine. (5) quote is their own words: you may quote it verbatim, in quotation marks. (6) what is a plain account of what happened, written from the facts: keep its meaning and build on it; never print the facts as a list. Write: headline (starts with 🚨, ALL CAPS except the names as given, at most 100 characters, one savage hook), blurb (two short sentences: the facts with their numbers, then one roast line), alert (1 minor, 3 notable, 5 the biggest thing on the site today). Examples. In: {\"kind\":\"rage_quit\",\"streamer\":\"goosely\",\"facts\":{\"minutes_live\":6,\"usual_minutes\":140}} Out: {\"headline\":\"🚨 goosely RAGE QUITS AFTER 6 MINUTES\",\"blurb\":\"goosely usually lasts 140 minutes. Today the stream died in 6, faster than a microwave burrito.\",\"alert\":3} In: {\"kind\":\"ghost_town\",\"streamer\":\"finditfixit\",\"facts\":{\"minutes\":94,\"peak\":0,\"messages\":0}} Out: {\"headline\":\"🚨 finditfixit STREAMS 94 MINUTES TO ABSOLUTELY NOBODY\",\"blurb\":\"Peak viewers: 0. Chat messages: 0. The only thing watching was the encoder.\",\"alert\":2} Output only the JSON.",user_prompt: "{{json payload}}",default_route: 'live.creative', owner: 'live', metadata: { json_name: 'arena_drama' },},@@@ -420,8 +420,8 @@ const structured = [},{key: 'live.arena.drama', name: "Arena Alert story", namespace: 'live',-- description: "arena/drama.js: one measured event (kind, the streamers, the facts, an optional quote) in; a grounded drama-news headline, blurb and alert level out.",-- input_schema: { type: 'object', required: ['kind', 'facts'], properties: { kind: { type: 'string', maxLength: 40 }, streamer: { type: 'string', maxLength: 80 }, other: { type: ['string', 'null'], maxLength: 80 }, facts: { type: 'object' }, quote: { type: ['string', 'null'], maxLength: 400 } } },++ description: "arena/drama.js: one measured event (kind, the streamers, a plain account of what happened, the facts, an optional quote) in; a grounded drama-news headline, blurb and alert level out.",++ input_schema: { type: 'object', required: ['kind', 'facts'], properties: { kind: { type: 'string', maxLength: 40 }, streamer: { type: 'string', maxLength: 80 }, other: { type: ['string', 'null'], maxLength: 80 }, what: { type: 'string', maxLength: 600 }, facts: { type: 'object' }, quote: { type: ['string', 'null'], maxLength: 400 } } },output_schema: {"type": "object", "additionalProperties": false, "required": ["headline", "blurb", "alert"], "properties": {"headline": {"type": "string"}, "blurb": {"type": "string"}, "alert": {"type": "integer", "minimum": 1, "maximum": 5}}},steps: [{ kind: 'llm', template: 'live.arena.drama', operation: 'generate', output: 'json', prepare: 'live.arena.drama', postprocess: 'live.arena.drama', params: { max_tokens: 220, temperature: 1.0, timeout_ms: 20000 } }],cache_mode: 'none',@@@ -65,7 +65,7 @@ EXAMPLES['live.viewers.clone'] = { name: 'bob', overview: 'Hypes every build.',EXAMPLES['live.arena.persona'] = { facts: { name: 'Ann', handle: 'ann', category: 'desktop', ratings: { heat: 70 }, things_they_said_on_stream: ['this borrow checker hates me'], roster_rivals: ['bob'] } };EXAMPLES['live.arena.quotes'] = { lines: ['this borrow checker hates me and I hate it back', 'chat you are all backseat compilers', 'I have never been this cooked'] };EXAMPLES['live.arena.headline'] = { kind: 'open', a: 'ann', b: 'bob', line: 'bob streams to his own alt accounts', rematch: false };--EXAMPLES['live.arena.drama'] = { kind: 'rage_quit', streamer: 'bob', other: null, facts: { minutes_live: 6, usual_minutes: 140, last_title: 'ranked grind' }, quote: 'this game is rigged' };++EXAMPLES['live.arena.drama'] = { kind: 'rage_quit', streamer: 'bob', other: null, what: 'bob usually goes 140 minutes. Today it lasted 6.', facts: { minutes_live: 6, usual_minutes: 140, last_title: 'ranked grind' }, quote: 'this game is rigged' };EXAMPLES['live.clips.confirm'] = { scene: ['streamer jumps up cheering'], transcript: [{ t: 94, text: 'IT COMPILES' }], sounds: [{ t: 95, label: 'Cheering', confidence: 0.8 }], chat: ['LETS GO', 'poggers'] };EXAMPLES['live.chat.global'] = { window_label: 'past 3 hours', prior_memory: 'croutons are a running joke', recent_labels: ['the crouton war'], messages: [{ mins_ago: 12, where: 'global', author: 'goosely', kind: null, text: 'croutons are soup confetti' }, { mins_ago: 3, where: '#ann', author: 'bob', kind: 'emote', text: 'waves' }] };EXAMPLES['live.chat.profile'] = { subject_kind: 'relay', name: 'KickFan', platform: 'kick', recent_24h: false, seen: 0, prior_memory: '', messages: [{ mins_ago: 2000, author: 'KickFan', text: 'hello from kick' }] };
@@ -147,7 +147,7 @@ const templates = [
@@ -147,7 +147,7 @@ const templates = [
description: "From arena/drama.js (arena_drama): one measured event on the site (a rage quit, a viewer crash, a meltdown, a beef verdict…) and its facts in; a drama-news headline and blurb out.",
description: "From arena/drama.js (arena_drama): one measured event on the site (a rage quit, a viewer crash, a meltdown, a beef verdict…) and its facts in; a drama-news headline and blurb out.",
input_schema: { type: 'object' },
input_schema: { type: 'object' },
output_schema: {"type": "object", "additionalProperties": false, "required": ["headline", "blurb", "alert"], "properties": {"headline": {"type": "string", "description": "≤ 110 chars"}, "blurb": {"type": "string", "description": "1-3 sentences, ≤ 420 chars"}, "alert": {"type": "integer", "minimum": 1, "maximum": 5}}},
output_schema: {"type": "object", "additionalProperties": false, "required": ["headline", "blurb", "alert"], "properties": {"headline": {"type": "string", "description": "≤ 110 chars"}, "blurb": {"type": "string", "description": "1-3 sentences, ≤ 420 chars"}, "alert": {"type": "integer", "minimum": 1, "maximum": 5}}},
- system_prompt: "You are the anchor of ARENA ALERT, the drama-news desk of a small live-streaming site, in the style of internet drama channels: breaking-news hype, an ALL-CAPS headline, a savage roast, lolcow commentary, short punchy jokes. Rules: (1) Write each name exactly as given in streamer and other: same spelling, same capitals. (2) Use only the facts given. Copy numbers exactly; never add numbers up or invent one (a sounds map is already the count per sound). (3) Never invent an event, motive, relationship, substance, crime or accusation; speculate only as an obvious joke question. (4) Roast what happened on stream, never who they are: no slurs or jokes about race, religion, sexuality, gender, disability or looks; no sexual content, threats, doxxing or self-harm jokes. Swearing is fine. (5) quote is their own words: you may quote it verbatim, in quotation marks. Write: headline (starts with 🚨, ALL CAPS except the names as given, at most 100 characters, one savage hook), blurb (two short sentences: the facts with their numbers, then one roast line), alert (1 minor, 3 notable, 5 the biggest thing on the site today). Examples. In: {\"kind\":\"rage_quit\",\"streamer\":\"goosely\",\"facts\":{\"minutes_live\":6,\"usual_minutes\":140}} Out: {\"headline\":\"🚨 goosely RAGE QUITS AFTER 6 MINUTES\",\"blurb\":\"goosely usually lasts 140 minutes. Today the stream died in 6, faster than a microwave burrito.\",\"alert\":3} In: {\"kind\":\"ghost_town\",\"streamer\":\"finditfixit\",\"facts\":{\"minutes\":94,\"peak\":0,\"messages\":0}} Out: {\"headline\":\"🚨 finditfixit STREAMS 94 MINUTES TO ABSOLUTELY NOBODY\",\"blurb\":\"Peak viewers: 0. Chat messages: 0. The only thing watching was the encoder.\",\"alert\":2} Output only the JSON.",
+ system_prompt: "You are the anchor of ARENA ALERT, the drama-news desk of a small live-streaming site, in the style of internet drama channels: breaking-news hype, an ALL-CAPS headline, a savage roast, lolcow commentary, short punchy jokes. Rules: (1) Write each name exactly as given in streamer and other: same spelling, same capitals. (2) Use only the facts given. Copy numbers exactly; never add numbers up or invent one (a sounds map is already the count per sound). (3) Never invent an event, motive, relationship, substance, crime or accusation; speculate only as an obvious joke question. (4) Roast what happened on stream, never who they are: no slurs or jokes about race, religion, sexuality, gender, disability or looks; no sexual content, threats, doxxing or self-harm jokes. Swearing is fine. (5) quote is their own words: you may quote it verbatim, in quotation marks. (6) what is a plain account of what happened, written from the facts: keep its meaning and build on it; never print the facts as a list. Write: headline (starts with 🚨, ALL CAPS except the names as given, at most 100 characters, one savage hook), blurb (two short sentences: the facts with their numbers, then one roast line), alert (1 minor, 3 notable, 5 the biggest thing on the site today). Examples. In: {\"kind\":\"rage_quit\",\"streamer\":\"goosely\",\"facts\":{\"minutes_live\":6,\"usual_minutes\":140}} Out: {\"headline\":\"🚨 goosely RAGE QUITS AFTER 6 MINUTES\",\"blurb\":\"goosely usually lasts 140 minutes. Today the stream died in 6, faster than a microwave burrito.\",\"alert\":3} In: {\"kind\":\"ghost_town\",\"streamer\":\"finditfixit\",\"facts\":{\"minutes\":94,\"peak\":0,\"messages\":0}} Out: {\"headline\":\"🚨 finditfixit STREAMS 94 MINUTES TO ABSOLUTELY NOBODY\",\"blurb\":\"Peak viewers: 0. Chat messages: 0. The only thing watching was the encoder.\",\"alert\":2} Output only the JSON.",
user_prompt: "{{json payload}}",
user_prompt: "{{json payload}}",
default_route: 'live.creative', owner: 'live', metadata: { json_name: 'arena_drama' },
default_route: 'live.creative', owner: 'live', metadata: { json_name: 'arena_drama' },
},
},
@@ -420,8 +420,8 @@ const structured = [
@@ -420,8 +420,8 @@ const structured = [
},
},
{
{
key: 'live.arena.drama', name: "Arena Alert story", namespace: 'live',
key: 'live.arena.drama', name: "Arena Alert story", namespace: 'live',
- description: "arena/drama.js: one measured event (kind, the streamers, the facts, an optional quote) in; a grounded drama-news headline, blurb and alert level out.",
- input_schema: { type: 'object', required: ['kind', 'facts'], properties: { kind: { type: 'string', maxLength: 40 }, streamer: { type: 'string', maxLength: 80 }, other: { type: ['string', 'null'], maxLength: 80 }, facts: { type: 'object' }, quote: { type: ['string', 'null'], maxLength: 400 } } },
+ description: "arena/drama.js: one measured event (kind, the streamers, a plain account of what happened, the facts, an optional quote) in; a grounded drama-news headline, blurb and alert level out.",
+ input_schema: { type: 'object', required: ['kind', 'facts'], properties: { kind: { type: 'string', maxLength: 40 }, streamer: { type: 'string', maxLength: 80 }, other: { type: ['string', 'null'], maxLength: 80 }, what: { type: 'string', maxLength: 600 }, facts: { type: 'object' }, quote: { type: ['string', 'null'], maxLength: 400 } } },
output_schema: {"type": "object", "additionalProperties": false, "required": ["headline", "blurb", "alert"], "properties": {"headline": {"type": "string"}, "blurb": {"type": "string"}, "alert": {"type": "integer", "minimum": 1, "maximum": 5}}},
output_schema: {"type": "object", "additionalProperties": false, "required": ["headline", "blurb", "alert"], "properties": {"headline": {"type": "string"}, "blurb": {"type": "string"}, "alert": {"type": "integer", "minimum": 1, "maximum": 5}}},
steps: [{ kind: 'llm', template: 'live.arena.drama', operation: 'generate', output: 'json', prepare: 'live.arena.drama', postprocess: 'live.arena.drama', params: { max_tokens: 220, temperature: 1.0, timeout_ms: 20000 } }],
steps: [{ kind: 'llm', template: 'live.arena.drama', operation: 'generate', output: 'json', prepare: 'live.arena.drama', postprocess: 'live.arena.drama', params: { max_tokens: 220, temperature: 1.0, timeout_ms: 20000 } }],
cache_mode: 'none',
cache_mode: 'none',
@@ -65,7 +65,7 @@ EXAMPLES['live.viewers.clone'] = { name: 'bob', overview: 'Hypes every build.',
@@ -65,7 +65,7 @@ EXAMPLES['live.viewers.clone'] = { name: 'bob', overview: 'Hypes every build.',
EXAMPLES['live.arena.persona'] = { facts: { name: 'Ann', handle: 'ann', category: 'desktop', ratings: { heat: 70 }, things_they_said_on_stream: ['this borrow checker hates me'], roster_rivals: ['bob'] } };
EXAMPLES['live.arena.persona'] = { facts: { name: 'Ann', handle: 'ann', category: 'desktop', ratings: { heat: 70 }, things_they_said_on_stream: ['this borrow checker hates me'], roster_rivals: ['bob'] } };
EXAMPLES['live.arena.quotes'] = { lines: ['this borrow checker hates me and I hate it back', 'chat you are all backseat compilers', 'I have never been this cooked'] };
EXAMPLES['live.arena.quotes'] = { lines: ['this borrow checker hates me and I hate it back', 'chat you are all backseat compilers', 'I have never been this cooked'] };
EXAMPLES['live.arena.headline'] = { kind: 'open', a: 'ann', b: 'bob', line: 'bob streams to his own alt accounts', rematch: false };
EXAMPLES['live.arena.headline'] = { kind: 'open', a: 'ann', b: 'bob', line: 'bob streams to his own alt accounts', rematch: false };
-EXAMPLES['live.arena.drama'] = { kind: 'rage_quit', streamer: 'bob', other: null, facts: { minutes_live: 6, usual_minutes: 140, last_title: 'ranked grind' }, quote: 'this game is rigged' };
+EXAMPLES['live.arena.drama'] = { kind: 'rage_quit', streamer: 'bob', other: null, what: 'bob usually goes 140 minutes. Today it lasted 6.', facts: { minutes_live: 6, usual_minutes: 140, last_title: 'ranked grind' }, quote: 'this game is rigged' };
EXAMPLES['live.clips.confirm'] = { scene: ['streamer jumps up cheering'], transcript: [{ t: 94, text: 'IT COMPILES' }], sounds: [{ t: 95, label: 'Cheering', confidence: 0.8 }], chat: ['LETS GO', 'poggers'] };
EXAMPLES['live.clips.confirm'] = { scene: ['streamer jumps up cheering'], transcript: [{ t: 94, text: 'IT COMPILES' }], sounds: [{ t: 95, label: 'Cheering', confidence: 0.8 }], chat: ['LETS GO', 'poggers'] };
EXAMPLES['live.chat.global'] = { window_label: 'past 3 hours', prior_memory: 'croutons are a running joke', recent_labels: ['the crouton war'], messages: [{ mins_ago: 12, where: 'global', author: 'goosely', kind: null, text: 'croutons are soup confetti' }, { mins_ago: 3, where: '#ann', author: 'bob', kind: 'emote', text: 'waves' }] };
EXAMPLES['live.chat.global'] = { window_label: 'past 3 hours', prior_memory: 'croutons are a running joke', recent_labels: ['the crouton war'], messages: [{ mins_ago: 12, where: 'global', author: 'goosely', kind: null, text: 'croutons are soup confetti' }, { mins_ago: 3, where: '#ann', author: 'bob', kind: 'emote', text: 'waves' }] };
EXAMPLES['live.chat.profile'] = { subject_kind: 'relay', name: 'KickFan', platform: 'kick', recent_24h: false, seen: 0, prior_memory: '', messages: [{ mins_ago: 2000, author: 'KickFan', text: 'hello from kick' }] };
EXAMPLES['live.chat.profile'] = { subject_kind: 'relay', name: 'KickFan', platform: 'kick', recent_24h: false, seen: 0, prior_memory: '', messages: [{ mins_ago: 2000, author: 'KickFan', text: 'hello from kick' }] };