Skip to content

Commit

Permalink
Update utils.py (#1128)
Browse files Browse the repository at this point in the history
不区分文件扩展名的大小写。
  • Loading branch information
xain committed Aug 16, 2023
1 parent 75d6feb commit 7cd7ca2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/knowledge_base/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(
):
self.kb_name = knowledge_base_name
self.filename = filename
self.ext = os.path.splitext(filename)[-1]
self.ext = os.path.splitext(filename)[-1].lower()
if self.ext not in SUPPORTED_EXTS:
raise ValueError(f"暂未支持的文件格式 {self.ext}")
self.filepath = get_file_path(knowledge_base_name, filename)
Expand Down

0 comments on commit 7cd7ca2

Please sign in to comment.