Skip to content

Commit

Permalink
Utilize 50% context window (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jan 28, 2024
1 parent 51eaa49 commit 948b9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/run_pr_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def generate_pr_summary(repo_name, diff_text):
if not diff_text:
diff_text = "**ERROR: DIFF IS EMPTY, THERE ARE ZERO CODE CHANGES IN THIS PR."
ratio = 3.3 # about 3.3 characters per token
limit = round(OPENAI_MODEL_TOKENS * ratio * 0.7) # use up to 70% of the context window
limit = round(OPENAI_MODEL_TOKENS * ratio * 0.5) # use up to 50% of the context window for prompt
messages = [
{
"role": "system",
Expand Down

0 comments on commit 948b9ba

Please sign in to comment.