feat: enable S2S with native Viking memory
This commit is contained in:
@@ -33,7 +33,25 @@ test("S2S session update maps persona and dialog id to provider dialog config",
|
||||
assert.equal(dialog.speaking_style, "亲切自然");
|
||||
assert.match(dialog.system_role, /只使用授权信息/);
|
||||
assert.match(dialog.system_role, /你是陪伴助手/);
|
||||
assert.equal("LLMConfig" in update.session.config, false);
|
||||
assert.match(update.session.config.LLMConfig.SystemMessages[0], /你是陪伴助手/);
|
||||
});
|
||||
|
||||
test("session update maps the bound user to native Viking memory without credentials", () => {
|
||||
const update = buildSessionUpdate({
|
||||
dialog_id: "conversation-memory", model_mode: "s2s", authorized_context: "authorized",
|
||||
memory: {
|
||||
collection_name: "memory", user_id: "u_subject_hash", assistant_id: "platform_companion_v1",
|
||||
memory_types: ["event_v1", "profile_v1"], limit: 5, transition_words: "自然承接历史记忆",
|
||||
},
|
||||
}, "event-memory");
|
||||
const memory = update.session.config.MemoryConfig;
|
||||
assert.equal(memory.Enable, true);
|
||||
assert.equal(memory.Provider, "volc");
|
||||
assert.equal(memory.ProviderParams.collection_name, "memory");
|
||||
assert.deepEqual(memory.ProviderParams.filter.user_id, ["u_subject_hash"]);
|
||||
assert.deepEqual(memory.ProviderParams.filter.assistant_id, ["platform_companion_v1"]);
|
||||
assert.deepEqual(memory.ProviderParams.filter.memory_type, ["event_v1", "profile_v1"]);
|
||||
assert.equal("token" in memory.ProviderParams, false);
|
||||
});
|
||||
|
||||
class FakeWebSocket extends EventEmitter {
|
||||
|
||||
Reference in New Issue
Block a user