Skip to content

Commit

Permalink
Improve variable consistency in prompt rendering for pr generate labe…
Browse files Browse the repository at this point in the history
…ls flow
  • Loading branch information
KennyDizi committed Aug 18, 2024
1 parent bd5c19e commit f9de8f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pr_agent/tools/pr_generate_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ async def _get_prediction(self, model: str) -> str:
environment = Environment(undefined=StrictUndefined)
set_custom_labels(variables, self.git_provider)
self.variables = variables
system_prompt = environment.from_string(get_settings().pr_custom_labels_prompt.system).render(variables)
user_prompt = environment.from_string(get_settings().pr_custom_labels_prompt.user).render(variables)
system_prompt = environment.from_string(get_settings().pr_custom_labels_prompt.system).render(self.variables)
user_prompt = environment.from_string(get_settings().pr_custom_labels_prompt.user).render(self.variables)

response, finish_reason = await self.ai_handler.chat_completion(
model=model,
Expand Down

0 comments on commit f9de8f2

Please sign in to comment.