Skip to content

Commit 3866c05

Browse files
FIX: Ensure 100% verbatim prompt and starting sentence
1 parent 43fed91 commit 3866c05

4 files changed

Lines changed: 319 additions & 2 deletions

File tree

assets/index-Ctj3tpvy.js

Lines changed: 307 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}(window.location));
1717
</script>
1818
<script src="./runtime-config.js"></script>
19-
<script type="module" crossorigin src="./assets/index-CqeJczsZ.js"></script>
19+
<script type="module" crossorigin src="./assets/index-Ctj3tpvy.js"></script>
2020
<link rel="stylesheet" crossorigin href="./assets/index-D83N1gQE.css">
2121
</head>
2222
<body>

frontend/src/offlineStore.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,6 +2704,16 @@ async function pickNextQuestion(state) {
27042704
const pastBotMessages = history.filter(m => m.sender === 'bot').map(m => m.message);
27052705
const conversationText = history.map(m => `${m.sender}: ${m.message}`).join('\n');
27062706

2707+
// Force exact first question from verbatim prompt if no history
2708+
if (history.length === 0) {
2709+
state.lastQuestionText = "Trước tiên, mình cần biết bạn hiện là học sinh, sinh viên hay người đã đi làm nhé.";
2710+
return {
2711+
id: "ai_start",
2712+
text: state.lastQuestionText,
2713+
tags: ["orientation"]
2714+
};
2715+
}
2716+
27072717
// Attempt LLM dynamic question ALWAYS
27082718
const llmQ = await generateNextQuestionWithLLM(conversationText, profile, pastBotMessages);
27092719
if (llmQ) {

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}(window.location));
1717
</script>
1818
<script src="./runtime-config.js"></script>
19-
<script type="module" crossorigin src="./assets/index-CqeJczsZ.js"></script>
19+
<script type="module" crossorigin src="./assets/index-Ctj3tpvy.js"></script>
2020
<link rel="stylesheet" crossorigin href="./assets/index-D83N1gQE.css">
2121
</head>
2222
<body>

0 commit comments

Comments
 (0)