Skip to content

Commit

Permalink
Fixing the snippet prompt building
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Podivin <[email protected]>
  • Loading branch information
jpodivin committed Dec 9, 2024
1 parent a44f259 commit c5cbfea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions logdetective/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ async def analyze_log_staged(build_log: BuildLog):
{"snippet":e[0], "comment":e[1]} for e in zip(log_summary, analyzed_snippets)]

final_prompt = PROMPT_TEMPLATE_STAGED.format(
[f"[{e["snippet"]}] : [{e["comment"]["choices"][0]["text"]}]\n{SNIPPET_DELIMITER}\n"
for e in analyzed_snippets])
f"\n{SNIPPET_DELIMITER}\n".join([
f"[{e["snippet"]}] : [{e["comment"]["choices"][0]["text"]}]"
for e in analyzed_snippets]))

print("PROMPT TEST: \n", final_prompt, "+++++++++++")
final_analysis = await submit_text(final_prompt)

certainty = 0
Expand Down

0 comments on commit c5cbfea

Please sign in to comment.