Merge branch 'main' into gemini-editblock-and-examples

This commit is contained in:
Paul Gauthier 2024-05-01 09:02:08 -07:00
commit 0fb08896e3
6 changed files with 34 additions and 6 deletions

View file

@ -11,6 +11,7 @@ from json.decoder import JSONDecodeError
from pathlib import Path
import git
import litellm
import openai
from jsonschema import Draft7Validator
from rich.console import Console, Text
@ -28,6 +29,8 @@ from aider.utils import is_image_file
from ..dump import dump # noqa: F401
litellm.suppress_debug_info = True
class MissingAPIKeyError(ValueError):
pass
@ -597,6 +600,9 @@ class Coder:
interrupted = True
except ExhaustedContextWindow:
exhausted = True
except litellm.exceptions.BadRequestError as err:
self.io.tool_error(f"BadRequestError: {err}")
return
except openai.BadRequestError as err:
if "maximum context length" in str(err):
exhausted = True

View file

@ -67,6 +67,7 @@ mathweb/flask/app.py
return str(math.factorial(n))
>>>>>>> REPLACE
{fence[1]}
<<<<<<< HEAD
""",
),
dict(

View file

@ -115,7 +115,7 @@ You always COMPLETELY IMPLEMENT the needed code!
files_no_full_files = "I am not sharing any *read-write* files yet."
repo_content_prefix = """Below here are summaries of other files present in this git repository.
repo_content_prefix = """Below here are summaries of some files present in this git repository.
Do not propose changes to these files, they are *read-only*.
To make a file *read-write*, ask the user to *add it to the chat*.
"""