diff --git a/.github/workflows/close-issue.yml b/.github/workflows/close-issue.yml new file mode 100644 index 0000000..d5cd3cf --- /dev/null +++ b/.github/workflows/close-issue.yml @@ -0,0 +1,22 @@ +name: Close inactive issues +on: + schedule: + - cron: "30 1 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v5 + with: + days-before-issue-stale: 30 + days-before-issue-close: 14 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." + close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index af75440..eac0805 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ logs .idea/ __pycache__/ /knowledge_base/ -configs/*.py +/configs/*.py .vscode/ .pytest_cache/ *.bak diff --git a/README.md b/README.md index a12c0f0..703c084 100644 --- a/README.md +++ b/README.md @@ -488,7 +488,7 @@ $ streamlit run webui.py --server.port 666 ## 项目交流群 -二维码 +二维码 🎉 langchain-ChatGLM 项目微信交流群,如果你也对本项目感兴趣,欢迎加入群聊参与讨论交流。 diff --git a/document_loaders/mypdfloader.py b/document_loaders/mypdfloader.py index c423643..6cb7726 100644 --- a/document_loaders/mypdfloader.py +++ b/document_loaders/mypdfloader.py @@ -6,7 +6,7 @@ import tqdm class RapidOCRPDFLoader(UnstructuredFileLoader): def _get_elements(self) -> List: def pdf2text(filepath): - import fitz + import fitz # pyMuPDF里面的fitz包,不要与pip install fitz混淆 from rapidocr_onnxruntime import RapidOCR import numpy as np ocr = RapidOCR() diff --git a/img/qr_code_60.jpg b/img/qr_code_60.jpg new file mode 100644 index 0000000..0188834 Binary files /dev/null and b/img/qr_code_60.jpg differ diff --git a/server/knowledge_base/utils.py b/server/knowledge_base/utils.py index 2297d15..906da4d 100644 --- a/server/knowledge_base/utils.py +++ b/server/knowledge_base/utils.py @@ -74,8 +74,8 @@ LOADER_DICT = {"UnstructuredHTMLLoader": ['.html'], "RapidOCRLoader": ['.png', '.jpg', '.jpeg', '.bmp'], "UnstructuredFileLoader": ['.eml', '.msg', '.rst', '.rtf', '.txt', '.xml', - '.doc', '.docx', '.epub', '.odt', - '.ppt', '.pptx', '.tsv'], # '.xlsx' + '.docx', '.epub', '.odt', + '.ppt', '.pptx', '.tsv'], } SUPPORTED_EXTS = [ext for sublist in LOADER_DICT.values() for ext in sublist]