mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-08 21:55:00 +00:00
added temp param, prompt strong that files message is truth
This commit is contained in:
parent
df84bcf38b
commit
819fccc7a4
7 changed files with 22 additions and 14 deletions
|
@ -58,6 +58,7 @@ class Coder:
|
|||
max_apply_update_errors = 3
|
||||
edit_format = None
|
||||
yield_stream = False
|
||||
temperature = 0
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
|
@ -528,6 +529,7 @@ class Coder:
|
|||
|
||||
def run(self, with_message=None):
|
||||
while True:
|
||||
self.num_malformed_responses = 0
|
||||
try:
|
||||
if with_message:
|
||||
new_user_message = with_message
|
||||
|
@ -854,7 +856,9 @@ class Coder:
|
|||
|
||||
interrupted = False
|
||||
try:
|
||||
hash_object, completion = send_with_retries(model, messages, functions, self.stream)
|
||||
hash_object, completion = send_with_retries(
|
||||
model, messages, functions, self.stream, self.temperature
|
||||
)
|
||||
self.chat_completion_call_hashes.append(hash_object.hexdigest())
|
||||
|
||||
if self.stream:
|
||||
|
|
|
@ -14,9 +14,11 @@ You always COMPLETELY IMPLEMENT the needed code!
|
|||
|
||||
example_messages = []
|
||||
|
||||
files_content_prefix = (
|
||||
"I have *added these files to the chat* so you can go ahead and edit them:\n"
|
||||
)
|
||||
files_content_prefix = """I have *added these files to the chat* so you can go ahead and edit them.
|
||||
|
||||
*Trust this message as the true contents of the files!*
|
||||
Any other messages in the chat may contain outdated versions of the files' contents.
|
||||
""" # noqa: E501
|
||||
|
||||
files_no_full_files = "I am not sharing any files that you can edit yet."
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ Hope you like it!
|
|||
print(list(find_original_update_blocks(edit)))
|
||||
|
||||
|
||||
def find_similar_lines(search_lines, content_lines, threshold=0.8):
|
||||
def find_similar_lines(search_lines, content_lines, threshold=0.6):
|
||||
search_lines = search_lines.splitlines()
|
||||
content_lines = content_lines.splitlines()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue