openvibers/openvibe.ai Commits

AI: a channel description names the streamer or says "they", never a guessed pronoun (#103)

OP OpenVibers committed 28 days ago · 610f0daea6 · 2 files, +2 −1

Changes

ddiff --git a/server/workflows/live.js b/server/workflows/live.js
iindex 68b7738..2dc1c33 100644
---- a/server/workflows/live.js
++++ b/server/workflows/live.js
@@@ -68,7 +68,7 @@ const templates = [
description: 'From ai-analysis.generateStreamerOverview.',
input_schema: { type: 'object' }, output_schema: { type: 'object' },
system_prompt: '',
-- user_prompt: 'You are writing the public description of a livestreamer\'s channel. It is shown on their channel page, in search results and on the home page\'s cards, so the first sentence must stand alone as a one-line summary of what they stream. Using only the signals below (aggregated across their streams, VODs and pastes), write 2-4 sentences of plain prose: what they stream (games, topics, activities), what keeps coming back, and the tone of the streams. Start with the streamer\'s name.\n\nRules:\n- Plain text only: no lists, bullets, headings, markdown, labels ("Handle:", "Overview:") or @handles.\n- Never describe anyone\'s appearance, body, clothing, age, ethnicity or perceived gender, and never guess at their private life, health or location.\n- No moderation notes, warnings or ratings.\n- Do not invent specifics the signals do not support; when the signals are thin, one or two short sentences are enough.\n\n{{ctx}}',
++ user_prompt: 'You are writing the public description of a livestreamer\'s channel. It is shown on their channel page, in search results and on the home page\'s cards, so the first sentence must stand alone as a one-line summary of what they stream. Using only the signals below (aggregated across their streams, VODs and pastes), write 2-4 sentences of plain prose: what they stream (games, topics, activities), what keeps coming back, and the tone of the streams. Start with the streamer\'s name, and after that refer to them by name or as "they"; never guess pronouns.\n\nRules:\n- Plain text only: no lists, bullets, headings, markdown, labels ("Handle:", "Overview:") or @handles.\n- Never describe anyone\'s appearance, body, clothing, age, ethnicity or perceived gender, and never guess at their private life, health or location.\n- No moderation notes, warnings or ratings.\n- Do not invent specifics the signals do not support; when the signals are thin, one or two short sentences are enough.\n\n{{ctx}}',
default_route: 'live.legacy', owner: 'live',
},
{
ddiff --git a/test/live-templates.test.js b/test/live-templates.test.js
iindex 7ce90d6..07dde98 100644
---- a/test/live-templates.test.js
++++ b/test/live-templates.test.js
@@@ -138,6 +138,7 @@ t.test("a channel description is public prose: never about looks, no lists or la
const prompt = tp('live.streamer.overview').user_prompt;
assert.match(prompt, /public description/);
assert.match(prompt, /Never describe anyone's appearance, body, clothing, age/);
++ assert.match(prompt, /never guess pronouns/);
assert.ok(!/moderation\.?$|notable for moderation/m.test(prompt), 'no staff-only moderation notes');
assert.match(tp('live.media.overview').user_prompt, /Never describe anyone's appearance/);
const out = POSTPROCESS['live.streamer.overview']({ text: '## Overview\n- Streamer handle: finditfixit (@finditfixit).\n- **Content:** repairs old TVs and radios\n- Tone: calm, patient\n\nAnn streams games: mostly Rust.' });