mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44:59 +00:00
fixed test_repo
This commit is contained in:
parent
a68d3d8a20
commit
2ed0c8fb66
2 changed files with 3 additions and 7 deletions
|
@ -10,10 +10,6 @@ from aider.sendchat import simple_send_with_retries
|
|||
from .dump import dump # noqa: F401
|
||||
|
||||
|
||||
class OpenAIClientNotProvided(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class GitRepo:
|
||||
repo = None
|
||||
aider_ignore_file = None
|
||||
|
@ -106,9 +102,6 @@ class GitRepo:
|
|||
return self.repo.git_dir
|
||||
|
||||
def get_commit_message(self, diffs, context):
|
||||
if not self.client:
|
||||
raise OpenAIClientNotProvided
|
||||
|
||||
if len(diffs) >= 4 * 1024 * 4:
|
||||
self.io.tool_error("Diff is too large to generate a commit message.")
|
||||
return
|
||||
|
|
|
@ -29,6 +29,9 @@ CACHE = None
|
|||
),
|
||||
)
|
||||
def send_with_retries(client, model_name, messages, functions, stream):
|
||||
if not client:
|
||||
raise ValueError("No openai client provided")
|
||||
|
||||
kwargs = dict(
|
||||
model=model_name,
|
||||
messages=messages,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue