|
@@ -2424,32 +2424,59 @@ function promptItem(promptKind, content) {
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
+const promptArrays = [
|
|
|
|
|
+ [
|
|
|
|
|
+ promptItem("custom", "ordinary custom"),
|
|
|
|
|
+ promptItem("custom", impostorGenerated),
|
|
|
|
|
+ promptItem("event_agent_system", managedGenerated),
|
|
|
|
|
+ ],
|
|
|
|
|
+ [
|
|
|
|
|
+ promptItem("custom", "ordinary custom"),
|
|
|
|
|
+ promptItem("event_agent_system", managedGenerated),
|
|
|
|
|
+ promptItem("custom", impostorGenerated),
|
|
|
|
|
+ ],
|
|
|
|
|
+];
|
|
|
|
|
+let currentPromptItems = [];
|
|
|
const systemPrompts = {
|
|
const systemPrompts = {
|
|
|
querySelectorAll() {
|
|
querySelectorAll() {
|
|
|
- return [
|
|
|
|
|
- promptItem("custom", "ordinary custom"),
|
|
|
|
|
- promptItem("custom", impostorGenerated),
|
|
|
|
|
- promptItem("event_agent_system", managedGenerated),
|
|
|
|
|
- ];
|
|
|
|
|
|
|
+ return currentPromptItems;
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
const toolInvocationMode = { value: "chat_agent_tools" };
|
|
const toolInvocationMode = { value: "chat_agent_tools" };
|
|
|
-const chatAgentTools = collectSystemPrompts();
|
|
|
|
|
-toolInvocationMode.value = "dual_agent";
|
|
|
|
|
-const dualAgent = collectSystemPrompts();
|
|
|
|
|
|
|
+const outputs = promptArrays.map((promptItems) => {
|
|
|
|
|
+ currentPromptItems = promptItems;
|
|
|
|
|
+ toolInvocationMode.value = "chat_agent_tools";
|
|
|
|
|
+ const chatAgentTools = collectSystemPrompts();
|
|
|
|
|
+ toolInvocationMode.value = "dual_agent";
|
|
|
|
|
+ const dualAgent = collectSystemPrompts();
|
|
|
|
|
+ return { chatAgentTools, dualAgent };
|
|
|
|
|
+});
|
|
|
const generatedMatches = [
|
|
const generatedMatches = [
|
|
|
isGeneratedEventPromptContent(impostorGenerated),
|
|
isGeneratedEventPromptContent(impostorGenerated),
|
|
|
isGeneratedEventPromptContent(managedGenerated),
|
|
isGeneratedEventPromptContent(managedGenerated),
|
|
|
];
|
|
];
|
|
|
-console.log(JSON.stringify({ chatAgentTools, dualAgent, generatedMatches }));
|
|
|
|
|
|
|
+console.log(JSON.stringify({
|
|
|
|
|
+ contentsAreDistinct: impostorGenerated !== managedGenerated,
|
|
|
|
|
+ generatedMatches,
|
|
|
|
|
+ outputs,
|
|
|
|
|
+}));
|
|
|
""",
|
|
""",
|
|
|
]
|
|
]
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ assert result["contentsAreDistinct"] is True
|
|
|
assert result["generatedMatches"] == [True, True]
|
|
assert result["generatedMatches"] == [True, True]
|
|
|
- assert result["chatAgentTools"] == ["ordinary custom"]
|
|
|
|
|
- assert result["dualAgent"] == ["ordinary custom", managed_generated]
|
|
|
|
|
|
|
+ assert result["outputs"] == [
|
|
|
|
|
+ {
|
|
|
|
|
+ "chatAgentTools": ["ordinary custom"],
|
|
|
|
|
+ "dualAgent": ["ordinary custom", managed_generated],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "chatAgentTools": ["ordinary custom"],
|
|
|
|
|
+ "dualAgent": ["ordinary custom", managed_generated],
|
|
|
|
|
+ },
|
|
|
|
|
+ ]
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_static_tool_mode_disables_only_event_agent_model_settings_group():
|
|
def test_static_tool_mode_disables_only_event_agent_model_settings_group():
|