-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathembedding_config.py
27 lines (24 loc) · 950 Bytes
/
embedding_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from ..document_loading_helper import LoadingSettings
from ..document_chunking_helper import ChunkingSettings
class EmbeddingConfig(ChunkingSettings, LoadingSettings):
def __init__(
self,
document_type: str,
chunking: ChunkingSettings | None,
loading: LoadingSettings | None,
use_advanced_image_processing: bool,
):
self.document_type = document_type
self.chunking = chunking
self.loading = loading
self.use_advanced_image_processing = use_advanced_image_processing
def __eq__(self, other):
if isinstance(self, other.__class__):
return (
self.document_type == other.document_type
and self.chunking == other.chunking
and self.loading == other.loading
and self.use_advanced_image_processing
== other.use_advanced_image_processing
)
return False