Parcourir la source

feat: add VTT file support to Document Extractor (#11148)

tags/0.13.0
Hiroshi Fujita il y a 11 mois
Parent
révision
a918cea2fe
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      api/core/workflow/nodes/document_extractor/node.py

+ 1
- 1
api/core/workflow/nodes/document_extractor/node.py Voir le fichier

@@ -113,7 +113,7 @@ def _extract_text_by_mime_type(*, file_content: bytes, mime_type: str) -> str:
def _extract_text_by_file_extension(*, file_content: bytes, file_extension: str) -> str:
"""Extract text from a file based on its file extension."""
match file_extension:
case ".txt" | ".markdown" | ".md" | ".html" | ".htm" | ".xml":
case ".txt" | ".markdown" | ".md" | ".html" | ".htm" | ".xml" | ".vtt":
return _extract_text_from_plain_text(file_content)
case ".json":
return _extract_text_from_json(file_content)

Chargement…
Annuler
Enregistrer