mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
fixed /tokens
This commit is contained in:
parent
9cbe114a74
commit
d2f924d6d1
1 changed files with 6 additions and 3 deletions
|
@ -106,11 +106,14 @@ class Commands:
|
||||||
self.coder.choose_fence()
|
self.coder.choose_fence()
|
||||||
|
|
||||||
# system messages
|
# system messages
|
||||||
main_sys = self.fmt_system_prompt(self.gpt_prompts.main_system)
|
main_sys = self.coder.fmt_system_prompt(self.coder.gpt_prompts.main_system)
|
||||||
main_sys += "\n" + self.fmt_system_prompt(self.gpt_prompts.system_reminder)
|
main_sys += "\n" + self.coder.fmt_system_prompt(self.coder.gpt_prompts.system_reminder)
|
||||||
msgs = [
|
msgs = [
|
||||||
dict(role="system", content=main_sys),
|
dict(role="system", content=main_sys),
|
||||||
dict(role="system", content=self.fmt_system_prompt(self.gpt_prompts.system_reminder)),
|
dict(
|
||||||
|
role="system",
|
||||||
|
content=self.coder.fmt_system_prompt(self.coder.gpt_prompts.system_reminder),
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
tokens = self.coder.main_model.token_count(msgs)
|
tokens = self.coder.main_model.token_count(msgs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue