Skip to content

Commit 1b9d35d

Browse files
no need to write an empty kb file
before writing a new one
1 parent e6601a8 commit 1b9d35d

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
@@ -51,15 +51,9 @@ def run_prebuild_script():
5151

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

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

0 commit comments

Comments
 (0)