Spaces:
Configuration error
Configuration error
Keep identity prompt context fixed
Browse files
app.js
CHANGED
|
@@ -2264,14 +2264,13 @@ function trimConversation() {
|
|
| 2264 |
|
| 2265 |
function promptMessagesForTurn(text) {
|
| 2266 |
if (!isAppIdentityQuestion(text)) return state.messages;
|
| 2267 |
-
const rest = state.messages.slice(SYSTEM_MESSAGES.length);
|
| 2268 |
return [
|
| 2269 |
{
|
| 2270 |
role: "system",
|
| 2271 |
content: IDENTITY_SYSTEM_PROMPT,
|
| 2272 |
},
|
| 2273 |
...IDENTITY_PRIMER_MESSAGES,
|
| 2274 |
-
|
| 2275 |
];
|
| 2276 |
}
|
| 2277 |
|
|
|
|
| 2264 |
|
| 2265 |
function promptMessagesForTurn(text) {
|
| 2266 |
if (!isAppIdentityQuestion(text)) return state.messages;
|
|
|
|
| 2267 |
return [
|
| 2268 |
{
|
| 2269 |
role: "system",
|
| 2270 |
content: IDENTITY_SYSTEM_PROMPT,
|
| 2271 |
},
|
| 2272 |
...IDENTITY_PRIMER_MESSAGES,
|
| 2273 |
+
{ role: "user", content: text },
|
| 2274 |
];
|
| 2275 |
}
|
| 2276 |
|