From ffe3da4df1cb7d7ff1376fc0265e4c22f898da0f Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 19 May 2023 16:17:40 -0700 Subject: [PATCH] do not sent file lists longer than 100 files --- aider/coder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aider/coder.py b/aider/coder.py index fc96e8210..e5e45de93 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -171,7 +171,7 @@ class Coder: if self.repo is not None: other_files = set(self.get_all_abs_files()) - set(self.abs_fnames) - if other_files: + if other_files and len(other_files) < 100: if self.use_ctags: files_listing = get_tags_map(other_files) ctags_msg = " with selected ctags content" @@ -498,7 +498,9 @@ class Coder: silent=True, ) except openai.error.InvalidRequestError: - self.io.tool_error("Failed to generate commit message using gpt-3.5-turbo due to an invalid request.") + self.io.tool_error( + "Failed to generate commit message using gpt-3.5-turbo due to an invalid request." + ) return commit_message = commit_message.strip().strip('"').strip()