forked from docarray/docarray
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
69 lines (59 loc) · 1.98 KB
/
__init__.py
File metadata and controls
69 lines (59 loc) · 1.98 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from typing import overload, Dict, Optional, List, TYPE_CHECKING
from .data import DocumentData, default_values
from .mixins import AllMixins
from ..base import BaseDCType
if TYPE_CHECKING:
from ..types import ArrayType, StructValueType, DocumentContentType
from .. import DocumentArray
from ..score import NamedScore
class Document(AllMixins, BaseDCType):
_data_class = DocumentData
_unresolved_fields_dest = 'tags'
@overload
def __init__(self):
...
@overload
def __init__(self, doc: Optional['Document'] = None, copy: bool = False):
...
@overload
def __init__(
self,
doc: Optional[Dict],
field_resolver: Optional[Dict[str, str]] = None,
unknown_fields_handler: str = 'catch',
):
...
@overload
def __init__(
self,
doc: Optional[Dict],
field_resolver: Optional[Dict[str, str]] = None,
unknown_fields_handler: str = 'catch',
):
...
@overload
def __init__(
self,
parent_id: Optional[str] = None,
granularity: Optional[int] = None,
adjacency: Optional[int] = None,
buffer: Optional[bytes] = None,
blob: Optional['ArrayType'] = None,
mime_type: Optional[str] = None,
text: Optional[str] = None,
content: Optional['DocumentContentType'] = None,
weight: Optional[float] = None,
uri: Optional[str] = None,
tags: Optional[Dict[str, 'StructValueType']] = None,
offset: Optional[float] = None,
location: Optional[List[float]] = None,
embedding: Optional['ArrayType'] = None,
modality: Optional[str] = None,
evaluations: Optional[Dict[str, 'NamedScore']] = None,
scores: Optional[Dict[str, 'NamedScore']] = None,
chunks: Optional['DocumentArray'] = None,
matches: Optional['DocumentArray'] = None,
):
...
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)