Spaces:
Running
Running
Delete kimi-js/kimi-trait-sim.js
Browse files- kimi-js/kimi-trait-sim.js +0 -19
kimi-js/kimi-trait-sim.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
| 1 |
-
// Simple trait simulation harness for development tuning.
|
| 2 |
-
// Usage: window.kimiTraitSim.run([ { emotion: 'positive', text: 'love joke' }, ... ])
|
| 3 |
-
(function () {
|
| 4 |
-
async function run(sequence, character = null) {
|
| 5 |
-
if (!window.kimiEmotionSystem || !window.kimiEmotionSystem.db) {
|
| 6 |
-
console.warn("Emotion system not ready");
|
| 7 |
-
return;
|
| 8 |
-
}
|
| 9 |
-
const results = [];
|
| 10 |
-
for (const step of sequence) {
|
| 11 |
-
const emotion = step.emotion || window.kimiEmotionSystem.analyzeEmotion(step.text || "", "auto");
|
| 12 |
-
const traits = await window.kimiEmotionSystem.updatePersonalityFromEmotion(emotion, step.text || "", character);
|
| 13 |
-
results.push({ emotion, text: step.text || "", traits: { ...traits } });
|
| 14 |
-
}
|
| 15 |
-
console.table(results.map(r => ({ emotion: r.emotion, ...r.traits })));
|
| 16 |
-
return results;
|
| 17 |
-
}
|
| 18 |
-
window.kimiTraitSim = { run };
|
| 19 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|