Skip to content

Commit 72cfa43

Browse files
committed
update changelog and fix document types
1 parent c6c935d commit 72cfa43

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

packages/ragbits-document-search/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
## Unreleased
44

5+
- BREAKING CHANGE: Providers and intermediate handlers refactored to parsers and enrichers (#419)
6+
57
## 0.10.0 (2025-03-17)
68

79
### Changed
810

911
- ragbits-core updated to version v0.10.0
10-
1112
- BREAKING CHANGE: Processing strategies refactored to ingest strategies (#394)
1213
- Compability with the new Vector Store interface from ragbits-core (#288)
1314
- Fix docstring formatting to resolve Griffe warnings

packages/ragbits-document-search/src/ragbits/document_search/documents/document.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import tempfile
22
from enum import Enum
33
from pathlib import Path
4-
from typing import Annotated
4+
from typing import Annotated, Any
55

66
from pydantic import BaseModel
77

@@ -11,7 +11,7 @@
1111

1212
class DocumentType(str, Enum):
1313
"""
14-
Types of documents that can be stored.
14+
Document types that can be parsed.
1515
"""
1616

1717
MD = "md"
@@ -31,12 +31,20 @@ class DocumentType(str, Enum):
3131
RST = "rst"
3232
RTF = "rtf"
3333
TSV = "tsv"
34+
JSON = "json"
3435
XML = "xml"
3536
JPG = "jpg"
3637
PNG = "png"
3738

3839
UNKNOWN = "unknown"
3940

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+
4048

4149
class DocumentMeta(BaseModel):
4250
"""

0 commit comments

Comments
 (0)