Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs: remove bytes field example
Signed-off-by: punndcoder28 <[email protected]>
  • Loading branch information
punndcoder28 committed Sep 14, 2023
commit 2ee9c0104e619a3f60a8bcfdc74e0bc98112d188
17 changes: 8 additions & 9 deletions docarray/documents/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,21 @@ class MultiModalDoc(BaseDoc):
text: Optional[str] = Field(
description='The text content stored in the document',
example='This is an example text content of the document',
default=None,
)
url: Optional[TextUrl] = Field(
description='''The url of the text content. When text content is too long
to be stored inline or in a file, the remote url can be used to load the
text content''',
description='URL to a (potentially remote) text file that can be loaded',
example='https://www.w3.org/History/19921103-hypertext/hypertext/README.html',
default=None,
)
embedding: Optional[AnyEmbedding] = Field(
description='''Embedding field is used to store tensor objects of type
Tensorflow, PyTorch, and NumPy''',
example='''np.zeros((3, 32, 32))''',
description='Store an embedding: a vector representation of the text',
example=[1, 0, 1],
default=None,
)
bytes_: Optional[bytes] = Field(
description='''The bytes of image or video content that can be loaded
into an image or video tensor object''',
example='',
description='Bytes representation of the text',
default=None,
)

def __init__(self, text: Optional[str] = None, **kwargs):
Expand Down