Skip to content

Commit 18d3afc

Browse files
punndcoder28Joan Fontanals
andauthored
docs: adding field descriptions to predefined point cloud 3D document (docarray#1792)
Signed-off-by: punndcoder28 <puneethk.2899@gmail.com> Co-authored-by: Joan Fontanals <joan.martinez@jina.ai>
1 parent a4fdb77 commit 18d3afc

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

docarray/documents/point_cloud/point_cloud_3d.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import numpy as np
44

5+
from pydantic import Field
6+
57
from docarray.base_doc import BaseDoc
68
from docarray.documents.point_cloud.points_and_colors import PointsAndColors
79
from docarray.typing import AnyEmbedding, PointCloud3DUrl
@@ -107,10 +109,25 @@ class MultiModalDoc(BaseDoc):
107109
```
108110
"""
109111

110-
url: Optional[PointCloud3DUrl] = None
111-
tensors: Optional[PointsAndColors] = None
112-
embedding: Optional[AnyEmbedding] = None
113-
bytes_: Optional[bytes] = None
112+
url: Optional[PointCloud3DUrl] = Field(
113+
description='URL to a file containing point cloud information. Can be remote (web) URL, or a local file path.',
114+
example='https://people.sc.fsu.edu/~jburkardt/data/obj/al.obj',
115+
default=None,
116+
)
117+
tensors: Optional[PointsAndColors] = Field(
118+
description='A tensor object of 3D point cloud of type `PointsAndColors`.',
119+
example=[[0, 0, 1], [1, 0, 1], [0, 1, 1]],
120+
default=None,
121+
)
122+
embedding: Optional[AnyEmbedding] = Field(
123+
description='Store an embedding: a vector representation of 3D point cloud.',
124+
example=[1, 1, 1],
125+
default=None,
126+
)
127+
bytes_: Optional[bytes] = Field(
128+
description='Bytes representation of 3D point cloud.',
129+
default=None,
130+
)
114131

115132
@classmethod
116133
def validate(

0 commit comments

Comments
 (0)