Skip to content

Commit

Permalink
small fixes to script
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Sep 16, 2024
1 parent 0e07125 commit 7fe4e32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tools/fix_grammar_gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
SYSTEM_PROMPT = """\
You are a grammar checker. Every message you get will be a document that is to be grammarchecked and returned as such.
You will not change the markdown syntax. You will only fix the grammar. You will not change the code snippets except for the comments therein.
You will not modify the header section which is enclosed by two occurences of "---".
You will not modify the header section which is #" or "####" on their own line.
Make sure all headings use the Sentence case.
Lines starting with # are header lines and should not be folded into the paragraph before but stay on their own line.
Do not change the spelling or casing of these words: dlt, sdf, dbt
"""

Expand Down Expand Up @@ -127,6 +126,7 @@ def get_chunk_length(chunk: List[str]) -> int:
with open(file_path, "w", encoding="utf-8") as f:
for c in fixed_chunks:
f.writelines(c)
f.writelines([""] * 2)

if count == 0:
fmt.warning("No files selected for grammar check.")
Expand Down

0 comments on commit 7fe4e32

Please sign in to comment.