Skip to content

Commit

Permalink
handled bz2 spec pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
wenting-zhao committed Sep 28, 2024
1 parent 32972f2 commit 72552d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/agent_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import bz2
import git
import os
import re
Expand Down Expand Up @@ -250,6 +251,9 @@ def get_message(
repo_info = ""

if agent_config.use_spec_info:
with bz2.open("spec.pdf.bz2", "rb") as in_file:
with open("spec.pdf", "wb") as out_file:
out_file.write(in_file.read())
spec_info = (
f"\n{SPEC_INFO_HEADER} "
+ get_specification(specification_pdf_path=Path(repo_path, "spec.pdf"))[
Expand Down

0 comments on commit 72552d4

Please sign in to comment.