Mike0021 commited on
Commit
2d63a46
·
verified ·
1 Parent(s): 98c19a7

Keep identity prompt context fixed

Browse files
Files changed (1) hide show
  1. app.js +1 -2
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
- ...rest,
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