Replace heuristic room read with Ollama sidecar

This commit is contained in:
Meta Vens 2026-05-02 20:37:13 +01:00
commit 8bd43c2c3a
14 changed files with 423 additions and 6 deletions

View file

@ -121,6 +121,7 @@ export function buildRequestPayload(
actor: request.contextBundle.actor,
guildContext: request.contextBundle.guildContext,
interactionMemory: request.contextBundle.interactionMemory,
situationalSocialRead: request.contextBundle.situationalSocialRead,
sourceGrounding: request.contextBundle.sourceGrounding,
stylePack: request.contextBundle.stylePack,
recentMessages: request.contextBundle.recentMessages,
@ -456,3 +457,19 @@ export function renderInteractionMemory(context: ContextBundle): string {
recentEvents,
].join("\n");
}
export function renderSituationalSocialRead(context: ContextBundle): string {
if (!context.situationalSocialRead) {
return "- No strong situational social read was derived from the immediate room context.";
}
return [
`- Summary: ${context.situationalSocialRead.summary}`,
`- Room tone: ${context.situationalSocialRead.roomTone}`,
`- Speaker current read: ${context.situationalSocialRead.speakerCurrentRead}`,
`- Social frame: ${context.situationalSocialRead.socialFrame}`,
`- Private response guidance (do not reveal): ${context.situationalSocialRead.responseGuidance}`,
"- Supporting signals:",
...context.situationalSocialRead.supportingSignals.map((signal) => ` ${signal}`),
].join("\n");
}