File tree 2 files changed +12
-3
lines changed
packages/ragbits-document-search
src/ragbits/document_search/documents
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ - BREAKING CHANGE: Providers and intermediate handlers refactored to parsers and enrichers (#419 )
6
+
5
7
## 0.10.0 (2025-03-17)
6
8
7
9
### Changed
8
10
9
11
- ragbits-core updated to version v0.10.0
10
-
11
12
- BREAKING CHANGE: Processing strategies refactored to ingest strategies (#394 )
12
13
- Compability with the new Vector Store interface from ragbits-core (#288 )
13
14
- Fix docstring formatting to resolve Griffe warnings
Original file line number Diff line number Diff line change 1
1
import tempfile
2
2
from enum import Enum
3
3
from pathlib import Path
4
- from typing import Annotated
4
+ from typing import Annotated , Any
5
5
6
6
from pydantic import BaseModel
7
7
11
11
12
12
class DocumentType (str , Enum ):
13
13
"""
14
- Types of documents that can be stored .
14
+ Document types that can be parsed .
15
15
"""
16
16
17
17
MD = "md"
@@ -31,12 +31,20 @@ class DocumentType(str, Enum):
31
31
RST = "rst"
32
32
RTF = "rtf"
33
33
TSV = "tsv"
34
+ JSON = "json"
34
35
XML = "xml"
35
36
JPG = "jpg"
36
37
PNG = "png"
37
38
38
39
UNKNOWN = "unknown"
39
40
41
+ @classmethod
42
+ def _missing_ (cls , value : object ) -> Any :
43
+ """
44
+ Return WILDCARD if the value is not found in the enum.
45
+ """
46
+ return cls .UNKNOWN
47
+
40
48
41
49
class DocumentMeta (BaseModel ):
42
50
"""
You can’t perform that action at this time.
0 commit comments