Skip to content

Commit 251f278

Browse files
committed
docs: adding field descriptions to predefined mesh 3D document
Signed-off-by: punndcoder28 <[email protected]>
1 parent 4ef4939 commit 251f278

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

docarray/documents/mesh/mesh_3d.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from docarray.typing.tensor.embedding import AnyEmbedding
66
from docarray.typing.url.url_3d.mesh_url import Mesh3DUrl
77

8+
from pydantic import Field
9+
810
T = TypeVar('T', bound='Mesh3D')
911

1012

@@ -103,10 +105,24 @@ class MultiModalDoc(BaseDoc):
103105
104106
"""
105107

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

111127
@classmethod
112128
def validate(

0 commit comments

Comments
 (0)