properly render the main sys prompt

This commit is contained in:
Paul Gauthier 2023-11-14 11:07:35 -08:00
parent bbc174a8fb
commit 60ca8f8c0d
2 changed files with 9 additions and 15 deletions

View file

@ -106,18 +106,13 @@ class Commands:
self.coder.choose_fence()
# system messages
main_sys = self.fmt_system_prompt(self.gpt_prompts.main_system)
main_sys += "\n" + self.fmt_system_prompt(self.gpt_prompts.system_reminder)
msgs = [
dict(
role="system",
content=self.coder.gpt_prompts.main_system
+ "\n"
+ self.coder.fmt_system_reminder(),
),
dict(
role="system",
content=self.coder.fmt_system_reminder(),
),
dict(role="system", content=main_sys),
dict(role="system", content=self.fmt_system_prompt(self.gpt_prompts.system_reminder)),
]
tokens = self.coder.main_model.token_count(msgs)
res.append((tokens, "system messages", ""))