Skip to content

Commit 172b432

Browse files
no need to write an empty kb file
before writing a new one
1 parent b18f032 commit 172b432

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

app/get_knowledge_base.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,9 @@ def run_prebuild_script():
5050

5151
def parse_markdown():
5252
""" Parse markdown files in the current directory into JSON """
53-
reset_knowledge_base() # Reset the JSON database file
5453
recursive_parse_directory('./.tmp/defang-docs') # Parse markdown files in the current directory
5554
print("Markdown parsing completed successfully.")
5655

57-
def reset_knowledge_base():
58-
""" Resets or initializes the knowledge base JSON file. """
59-
with open(kb_file_path, 'w') as output_file:
60-
json.dump([], output_file)
61-
6256
def parse_markdown_file_to_json(json_output, current_id, file_path):
6357
""" Parses individual markdown file and adds its content to JSON """
6458
with open(file_path, 'r', encoding='utf-8') as file:

0 commit comments

Comments
 (0)