From 948b9baaf56b44b1d0146d7fd8cdbf745de3f216 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 28 Jan 2024 19:30:04 +0100 Subject: [PATCH] Utilize 50% context window (#66) --- utils/run_pr_summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/run_pr_summary.py b/utils/run_pr_summary.py index 0e24e37e..afc20fb6 100644 --- a/utils/run_pr_summary.py +++ b/utils/run_pr_summary.py @@ -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",