Pārlūkot izejas kodu

Fix typo (#3319)

### What problem does this PR solve?

Fix typo

### Type of change

- [x] Refactoring
tags/v0.14.0
Zhichang Yu pirms 11 mēnešiem
vecāks
revīzija
7c486ee3f9
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
3 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 1
    1
      api/apps/document_app.py
  2. 0
    0
      api/constants.py
  3. 3
    3
      api/utils/file_utils.py

+ 1
- 1
api/apps/document_app.py Parādīt failu

@@ -39,7 +39,7 @@ from api.utils.api_utils import get_json_result
from rag.utils.storage_factory import STORAGE_IMPL
from api.utils.file_utils import filename_type, thumbnail
from api.utils.web_utils import html2pdf, is_valid_url
from api.contants import IMG_BASE64_PREFIX
from api.constants import IMG_BASE64_PREFIX


@manager.route('/upload', methods=['POST'])

api/contants.py → api/constants.py Parādīt failu


+ 3
- 3
api/utils/file_utils.py Parādīt failu

@@ -25,7 +25,7 @@ from cachetools import LRUCache, cached
from ruamel.yaml import YAML

from api.db import FileType
from api.contants import IMG_BASE64_PREFIX
from api.constants import IMG_BASE64_PREFIX

PROJECT_BASE = os.getenv("RAG_PROJECT_BASE") or os.getenv("RAG_DEPLOY_BASE")
RAG_BASE = os.getenv("RAG_BASE")
@@ -71,7 +71,7 @@ def get_home_cache_dir():
dir = os.path.join(os.path.expanduser('~'), ".ragflow")
try:
os.mkdir(dir)
except OSError as error:
except OSError:
pass
return dir

@@ -193,7 +193,7 @@ def thumbnail_img(filename, blob):
presentation.slides[0].get_thumbnail(0.03, 0.03).save(
buffered, drawing.imaging.ImageFormat.png)
return buffered.getvalue()
except Exception as e:
except Exception:
pass
return None


Notiek ielāde…
Atcelt
Saglabāt