Skip to content

Commit

Permalink
Updating AI call
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiefHolland committed May 1, 2024
1 parent 794b95f commit 910fb8e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def do_code_review(gh_session: Github, repo_and_pr: dict, ai_client: OpenAI):

for item in changed_files:
log.info(f"Having Salacious review diff for {item.filename}...")
contents = repo.get_contents(item.filename).decoded_content
if not type(item) == "str":
if item.patch is None:
log.warning(f"Skipping empty source file {item.filename}...")
Expand All @@ -76,7 +75,7 @@ def do_code_review(gh_session: Github, repo_and_pr: dict, ai_client: OpenAI):
skipped_files.append(item.filename)
else:
diff_comment = submit_to_gpt(
contents, # f"filename: {item.filename} ** {item.patch}",
f"filename: {item.filename} ** {item.patch}",
ai_client=ai_client,
)
if "comments" in diff_comment:
Expand All @@ -87,7 +86,7 @@ def do_code_review(gh_session: Github, repo_and_pr: dict, ai_client: OpenAI):
f"Salacious has failed review of {item.filename} trying again..."
)
diff_comment = submit_to_gpt(
contents,
f"filename: {item.filename} ** {item.patch}",
ai_client=ai_client,
)
if "comments" in diff_comment:
Expand Down

0 comments on commit 910fb8e

Please sign in to comment.