Compare commits

..

2 Commits

Author SHA1 Message Date
Pierre-Loic Doulcet 106d56455e Merge branch 'main' into fastMode 2024-05-29 15:35:16 -07:00
Pierre-Loic Doulcet 938ffbc47f Add the fast mode flag 2024-05-23 20:22:19 +02:00
4 changed files with 2903 additions and 2784 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ repos:
args:
[
"--ignore-words-list",
"astroid,gallary,momento,narl,ot,rouge,nin,gere,te,inh,vor",
"astroid,gallary,momento,narl,ot,rouge,nin,gere,te,inh",
]
- repo: https://github.com/srstevenson/nb-clean
rev: 3.1.0
File diff suppressed because one or more lines are too long
+5
View File
@@ -73,6 +73,10 @@ class LlamaParse(BasePydanticReader):
default=None,
description="The API key for the GPT-4o API. Lowers the cost of parsing.",
)
fast_mode: bool = Field(
default=False,
description="Super fast mode for parsing. Only output Text, do not extract tables, images, etc.",
)
ignore_errors: bool = Field(
default=True,
description="Whether or not to ignore and skip errors raised during parsing.",
@@ -129,6 +133,7 @@ class LlamaParse(BasePydanticReader):
data={
"language": self.language.value,
"parsing_instruction": self.parsing_instruction,
"fast_mode": self.fast_mode,
"invalidate_cache": self.invalidate_cache,
"skip_diagonal_text": self.skip_diagonal_text,
"gpt4o_mode": self.gpt4o_mode,
+40 -74
View File
@@ -101,93 +101,59 @@ class Language(str, Enum):
SUPPORTED_FILE_TYPES = [
".pdf",
# document and presentations
".602",
".abw",
".cgm",
".cwk",
# Microsoft word - all versions
".doc",
".docx",
".docm",
".dot",
".dotx",
".dotm",
".hwp",
".key",
".lwp",
".mw",
".mcw",
".pages",
".pbd",
".ppt",
".pptm",
".pptx",
".pot",
".potm",
".potx",
# Rich text format
".rtf",
".sda",
".sdd",
".sdp",
".sdw",
".sgl",
".sti",
".sxi",
# Microsoft Works
".wps",
# Word Perfect
".wpd",
# Open Office
".sxw",
".stw",
".sxg",
".txt",
".uof",
".uop",
# Apple
".pages",
# Mac Write
".mw",
".mcw",
# Unified Office Format text
".uot",
".vor",
".wpd",
".wps",
".xml",
".zabw",
".uof",
".uos",
".uop",
# Microsoft powerpoints
".ppt",
".pptx",
".pot",
".pptm",
".potx",
".potm",
# Apple keynote
".key",
# Open Office Presentations
".odp",
".odg",
".otp",
".fopd",
".sxi",
".sti",
# ebook
".epub",
# images
# html
".html",
".htm",
# media,
".jpg",
".jpeg",
".png",
".gif",
".bmp",
".svg",
".tiff",
".webp",
# web
".htm",
".html",
# spreadsheets
".xlsx",
".xls",
".xlsm",
".xlsb",
".xlw",
".csv",
".dif",
".sylk",
".slk",
".prn",
".numbers",
".et",
".ods",
".fods",
".uos1",
".uos2",
".dbf",
".wk1",
".wk2",
".wk3",
".wk4",
".wks",
".123",
".wq1",
".wq2",
".wb1",
".wb2",
".wb3",
".qpw",
".xlr",
".eth",
".tsv",
".gif",
".svg",
]