openvibers/openvibe.exchange Commits

Chat: say which model you are talking to (#95)

OP OpenVibers committed 7 days ago · 3c682edb00 · 2 files, +6 −3

* Chat: the fold names the model you are talking to; the floor is a quiet line under the welcome

* API page: the strict-privacy switch keeps the card's inset like the prose around it

Changes

ddiff --git a/public/css/exchange.css b/public/css/exchange.css
iindex 87899a8..0ec3874 100644
---- a/public/css/exchange.css
++++ b/public/css/exchange.css
@@@ -67,7 +67,7 @@
.ex-sec-body > .ex-presets, .ex-sec-body > .ex-floor-box, .ex-sec-body > .ex-seller,
.ex-sec-body > .ovk-receipt, .ex-sec-body > .ovk-notice, .ex-sec-body > .ovk-empty,
.ex-sec-body > .ovk-snippet, .ex-sec-body > .ex-try, .ex-sec-body > .ex-signin,
--.ex-sec-body > .ovk-stats { margin-left: 14px; margin-right: 14px; }
++.ex-sec-body > .ovk-stats, .ex-sec-body > .ex-switch { margin-left: 14px; margin-right: 14px; }
.ex-sec-body > p, .ex-sec-body > ul:not(.ex-mlist), .ex-sec-body > h3, .ex-sec-body > .ex-presets { margin-bottom: 12px; }
.ex-sec-body > .ex-more { padding: 0 14px 12px; margin: 8px 0 0; }
.ex-sec-body > .ovk-list, .ex-sec-body > .ovk-table-wrap, .ex-sec-body > .ex-mlist {
ddiff --git a/server/http/pages.js b/server/http/pages.js
iindex 88f579e..425e261 100644
---- a/server/http/pages.js
++++ b/server/http/pages.js
@@@ -177,7 +177,10 @@ function createPageRoutes(ctx) {
function composerFor({ chat = null, models, problem = null, action = '/chat/send' }) {
const selected = chat && chat.models.length ? chat.models : models.slice(0, 1).map((m) => m.slug);
const strict = Boolean(chat && chat.strict_privacy);
-- const settings = `<details class="ovt-settings"><summary>Models, system prompt and temperature</summary>
++ // The model you are talking to is said on the fold itself, so the main choice is seen without opening it.
++ const nameOf = (slug) => { const m = models.find((x) => x.slug === slug); return m ? m.name : slug; };
++ const talking = selected.slice(0, 3).map(nameOf).filter(Boolean);
++ const settings = `<details class="ovt-settings"><summary>${talking.length ? `<b>${esc(talking.join(' · '))}</b> · change models, system prompt, temperature` : 'Models, system prompt and temperature'}</summary>
<div class="ovt-settings-body">
${kit.chips({ name: 'models', label: 'Compare up to three models', options: modelOptions(models, selected), single: false })}
<label class="ex-label" for="sys">System prompt (optional)</label>
@@@ -242,7 +245,7 @@ ${m.meta && m.meta.preset ? `<dt>Preset</dt><dd>${esc(m.meta.preset)}</dd>` : ''
}
}
}
-- const empty = `<div class="ovt-welcome"><h2>Every model, one chat</h2><p>Pick one model, or up to three to compare side by side. The floor applies always: no sexual content involving minors, no non-consensual sexual content (fiction included) and no incest, no help with mass harm.</p></div>`;
++ const empty = `<div class="ovt-welcome"><h2>Every model, one chat</h2><p>Pick one model, or up to three to compare side by side.</p><p class="ex-muted ex-small">The floor applies on every model: no sexual content involving minors, no non-consensual sexual content (fiction included) and no incest, no help with mass harm.</p></div>`;
return page(req, res, {
title: chat ? chat.title : 'Chat', index: false,
class: 'ex-chat', app: true,