mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
More accurate /tokens
This commit is contained in:
parent
6cb4428cb7
commit
95a777a48c
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ class Commands:
|
|||
relative_fname = self.coder.get_rel_fname(fname)
|
||||
content = self.io.read_text(fname)
|
||||
# approximate
|
||||
content = "```\n" + content + "```\n"
|
||||
content = f"{relative_fname}\n```\n" + content + "```\n"
|
||||
tokens = len(self.tokenizer.encode(content))
|
||||
res.append((tokens, f"{relative_fname}", "use /drop to drop from chat"))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue