jbilcke-hf HF Staff commited on
Commit
6a98c79
·
1 Parent(s): affe711
Files changed (1) hide show
  1. src/app/queries/getDialogue.ts +3 -1
src/app/queries/getDialogue.ts CHANGED
@@ -73,8 +73,10 @@ Here is the original situation, which will inform you about the general game moo
73
  }
74
  }
75
 
 
 
76
  // llama-2 is too chatty, let's keep 3 sentences at most
77
- const sentences = sbd.sentences(result).slice(0, 3).join(" ")
78
 
79
  return sentences
80
  }
 
73
  }
74
  }
75
 
76
+ const tmp = result.split("game master:").pop() || result
77
+
78
  // llama-2 is too chatty, let's keep 3 sentences at most
79
+ const sentences = sbd.sentences(tmp).slice(0, 3).join(" ").trim()
80
 
81
  return sentences
82
  }