Skip to content

Commit fa67f86

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

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

docarray/documents/mesh/mesh_3d.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from typing import Any, Optional, Type, TypeVar, Union
22

3+
from pydantic import Field
4+
35
from docarray.base_doc import BaseDoc
46
from docarray.documents.mesh.vertices_and_faces import VerticesAndFaces
57
from docarray.typing.tensor.embedding import AnyEmbedding
68
from docarray.typing.url.url_3d.mesh_url import Mesh3DUrl
79

10+
811
T = TypeVar('T', bound='Mesh3D')
912

1013

@@ -103,10 +106,24 @@ class MultiModalDoc(BaseDoc):
103106
104107
"""
105108

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

111128
@classmethod
112129
def validate(

0 commit comments

Comments
 (0)