From c099e6662b8a6e320ac314d31eda9b40455e5aa7 Mon Sep 17 00:00:00 2001
From: lyg <1543117173@qq.com>
Date: 星期四, 22 五月 2025 09:27:37 +0800
Subject: [PATCH] 修改指令json生成相关提示词和代码逻辑

---
 main.py |   65 --------------------------------
 1 files changed, 0 insertions(+), 65 deletions(-)

diff --git a/main.py b/main.py
index 7508d18..e69de29 100644
--- a/main.py
+++ b/main.py
@@ -1,65 +0,0 @@
-import math
-import os
-
-from knowledgebase.markitdown import MarkItDown
-
-from doc_to_docx import doc_to_docx
-
-
-def process_docs(directory):
-    # 閬嶅巻鐩綍涓嬬殑鎵�鏈夋枃浠�
-    for filename in os.listdir(directory):
-        # 鍒ゆ柇鏄惁涓� doc 鏂囦欢
-        if filename.endswith(".doc"):
-            # 杞崲涓� docx
-            doc_to_docx(directory + filename, directory + filename.replace(".doc", ".docx"))
-
-
-md = MarkItDown()
-
-
-def to_markdown(dst_dir: str):
-    text = ''
-    # 閬嶅巻鏂囦欢澶逛笅鐨勬墍鏈夋枃浠�
-    for file in os.listdir(dst_dir):
-        # 鍒ゆ柇鏄惁涓� docx 鏂囦欢
-        if file.endswith(".docx"):
-            # 杞崲涓� md
-            result = md.convert(dst_dir + file)
-            text = result.text_content
-            out_file = dst_dir + file + '.md'
-            with open(out_file, 'w', encoding='utf-8') as f:
-                f.write(text)
-    return out_file
-
-
-# 1.瑙f瀽鏂囨。
-# 2.杈撳叆鏂囨。
-# 3.鍚姩LangFlow
-def main():
-    doc_dir = ".\\doc\\"
-    # 澶勭悊鏂囨。
-    # process_docs(doc_dir)
-    # 鏂囨。杞崲涓簃arkdown
-    md_file = to_markdown(doc_dir)
-
-    md_file = 'D:\\workspace\\PythonProjects\\KnowledgeBase\\doc\\test.md'
-    # 鍚姩澶фā鍨嬪鐞嗘祦绋�
-    # ret_text = LangFlow([md_file]).run()
-    # 淇濆瓨缁撴灉
-    # with open('D:\\workspace\\PythonProjects\\KnowledgeBase\\doc\\test.text', 'w', encoding='utf-8') as f:
-    #     f.write(ret_text)
-
-
-def get_bit_mask(start, end):
-    bits = math.ceil((end + 1) / 8) * 8
-    if bits == 0:
-        bits = 8
-    mask = 0
-    for i in range(start, end + 1):
-        mask |= 1 << (bits - i - 1)
-    return mask
-
-
-if __name__ == '__main__':
-    main()
\ No newline at end of file

--
Gitblit v1.9.1