Skip to content

Commit

Permalink
Fixed retry logic in chat handler
Browse files Browse the repository at this point in the history
  • Loading branch information
dougollerenshaw committed Sep 19, 2024
1 parent b93a5bd commit b587065
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion codeaide/logic/chat_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,18 @@ def process_input(self, user_input):
self.cost_tracker.log_request(response)

try:
parsed_response = parse_response(response)
if parsed_response[0] is None: # If parsing failed
raise ValueError("Failed to parse JSON response")

(
text,
questions,
code,
code_version,
version_description,
requirements,
) = parse_response(response)
) = parsed_response

if (
code
Expand Down

0 comments on commit b587065

Please sign in to comment.