mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
record response hashes too
This commit is contained in:
parent
974d96973c
commit
9cfebc0b60
2 changed files with 12 additions and 2 deletions
|
@ -104,6 +104,7 @@ class Coder:
|
|||
fnames = []
|
||||
|
||||
self.chat_completion_call_hashes = []
|
||||
self.chat_completion_response_hashes = []
|
||||
|
||||
self.verbose = verbose
|
||||
self.abs_fnames = set()
|
||||
|
@ -611,6 +612,13 @@ class Coder:
|
|||
except AttributeError as content_err:
|
||||
show_content_err = content_err
|
||||
|
||||
resp_hash = dict(
|
||||
function_call=self.partial_response_function_call,
|
||||
content=self.partial_response_content,
|
||||
)
|
||||
resp_hash = hashlib.sha1(json.dumps(resp_hash, sort_keys=True).encode())
|
||||
self.chat_completion_response_hashes.append(resp_hash.hexdigest())
|
||||
|
||||
if show_func_err and show_content_err:
|
||||
self.io.tool_error(show_func_err)
|
||||
self.io.tool_error(show_content_err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue