From bd5c19ee05eb2102cea1e9be0c384aed4fba2d55 Mon Sep 17 00:00:00 2001 From: "trung.dinh@zoi.tech" Date: Sun, 18 Aug 2024 20:29:59 +0700 Subject: [PATCH] Improve variable consistency in prompt rendering for pr description flow --- pr_agent/tools/pr_description.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index 2bcbd89e..1b3f33c1 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -348,8 +348,8 @@ extra_file_yaml = set_custom_labels(variables, self.git_provider) self.variables = variables - system_prompt = environment.from_string(get_settings().get(prompt, {}).get("system", "")).render(variables) - user_prompt = environment.from_string(get_settings().get(prompt, {}).get("user", "")).render(variables) + system_prompt = environment.from_string(get_settings().get(prompt, {}).get("system", "")).render(self.variables) + user_prompt = environment.from_string(get_settings().get(prompt, {}).get("user", "")).render(self.variables) response, finish_reason = await self.ai_handler.chat_completion( model=model,