Skip to content

Commit

Permalink
handle errors when fixing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Oct 30, 2024
1 parent eb608f8 commit d93af5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion agixt/XT.py
Original file line number Diff line number Diff line change
Expand Up @@ -2312,6 +2312,7 @@ async def fix_and_execute_code(
self,
user_input: str,
code: str,
code_error: str,
file_content: str,
file_preview: str = "",
import_file: str = "",
Expand All @@ -2327,7 +2328,7 @@ async def fix_and_execute_code(
file_preview=file_preview,
import_file=import_file,
code=code,
code_error=str(code_execution),
code_error=str(code_error),
log_user_input=False,
log_output=False,
browse_links=False,
Expand Down Expand Up @@ -2373,6 +2374,7 @@ async def fix_and_execute_code(
return await self.fix_and_execute_code(
user_input=user_input,
code=code_verification,
code_error=str(code_execution),
file_content=file_content,
file_preview=file_preview,
import_file=import_file,
Expand Down Expand Up @@ -2536,6 +2538,7 @@ async def analyze_data(
code_execution = await self.fix_and_execute_code(
user_input=user_input,
code=code_verification,
code_error=str(code_execution),
file_content=file_content,
file_preview=file_preview,
import_file=import_file,
Expand Down

0 comments on commit d93af5d

Please sign in to comment.