mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
aider: Replaced use_ctags
with map_tokens
parameter in RepoMap
class.
# Context: USER: update `aider/repomap.py` ASSISTANT: Please provide the specific changes you would like me to make in the `aider/repomap.py` file. USER: to use map_tokens not `use_ctags` ASSISTANT: I will update the `aider/repomap.py` file to use `map_tokens` instead of `use_ctags`. ```python aider/repomap.py <<<<<<< ORIGINAL def __init__(self, use_ctags=None, root=None, main_model="gpt-4", io=None): self.io = io if not root: root = os.getcwd() self.root = root self.load_ident_cache() self.load_tags_cache() if use_ctags is None: self.use_ctags = self.check_for_ctags() else: self.use_ctags = use_ctags self.tokenizer = tiktoken.encoding_for_model(main_model) ======= def __init__(self, map_tokens=1024, root=None, main_model="gpt-4", io=None): self.io = io if not root: root = os.getcwd() self.root = root self.load_ident_cache() self.load_tags_cache() self.map_tokens = map_tokens self.tokenizer = tiktoken.encoding_for_model(main_model) >>>>>>> UPDATED ``` This change replaces the `use_ctags` parameter with the `map_tokens` parameter in the `__init__` method of the `RepoMap` class. Make sure to update any other parts of the code that use `use_ctags` to use `map_tokens` instead.
This commit is contained in:
parent
d996fbe1c3
commit
1f9e9be64d
1 changed files with 2 additions and 5 deletions
|
@ -61,7 +61,7 @@ class RepoMap:
|
|||
# 1/4 of gpt-4's context window
|
||||
max_map_tokens = 512
|
||||
|
||||
def __init__(self, use_ctags=None, root=None, main_model="gpt-4", io=None):
|
||||
def __init__(self, map_tokens=1024, root=None, main_model="gpt-4", io=None):
|
||||
self.io = io
|
||||
|
||||
if not root:
|
||||
|
@ -71,10 +71,7 @@ class RepoMap:
|
|||
self.load_ident_cache()
|
||||
self.load_tags_cache()
|
||||
|
||||
if use_ctags is None:
|
||||
self.use_ctags = self.check_for_ctags()
|
||||
else:
|
||||
self.use_ctags = use_ctags
|
||||
self.map_tokens = map_tokens
|
||||
|
||||
self.tokenizer = tiktoken.encoding_for_model(main_model)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue