fix api argument error (#1920)

### What problem does this PR solve?

#1918 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-08-13 10:15:55 +08:00
committed by GitHub
parent eb8feaf20a
commit 8badf3f423
3 changed files with 6 additions and 4 deletions

View File

@ -372,6 +372,8 @@ class FileService(CommonService):
doc["parser_id"] = ParserType.AUDIO.value
if re.search(r"\.(ppt|pptx|pages)$", filename):
doc["parser_id"] = ParserType.PRESENTATION.value
if re.search(r"\.(eml)$", filename):
doc["parser_id"] = ParserType.EMAIL.value
DocumentService.insert(doc)
FileService.add_file_from_kb(doc, kb_folder["id"], kb.tenant_id)