Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion docs/user_guide/representing/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ BannerDoc(image='https://example.com/image2.png', title='Bye Bye World', descrip

!!! note
The syntax `DocList[BannerDoc]` might surprise you in this context.
It is actually at the heart of DocArray but we'll come back to it later LINK TO LATER and continue with this example for now.
It is actually at the heart of DocArray, but we'll come back to it [later](#doclistdoctype-syntax) and continue with this example for now.

As we said earlier, `DocList` (or more generally `AnyDocArray`) extends the `BaseDoc` API at the array level.

Expand Down
12 changes: 1 addition & 11 deletions docs/user_guide/representing/first_step.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,10 @@ The [BaseDoc][docarray.base_doc.doc.BaseDoc] class inherits from Pydantic [BaseM
all the features of `BaseModel` in your `Doc` class. `BaseDoc`:

* Will perform data validation: `BaseDoc` will check that the data you pass to it is valid. If not, it will raise an
error. Data being "valid" is actually defined by the type used in the type hint itself, but we will come back to this concept later. (TODO add typing section)
error. Data being "valid" is actually defined by the type used in the type hint itself, but we will come back to this concept [later](../../data_types/first_steps.md).
* Can be configured using a nested `Config` class, see Pydantic [documentation](https://docs.pydantic.dev/usage/model_config/) for more detail on what kind of config Pydantic offers.
* Can be used as a drop-in replacement for `BaseModel` in your code and is compatible with tools that use Pydantic, like [FastAPI]('https://fastapi.tiangolo.com/').

### How is `BaseDoc` different to Pydantic's `BaseModel`? (INCOMPLETE)

LINK TO THE VERSUS (not ready)

[BaseDoc][docarray.base_doc.doc.BaseDoc] is not just a [BaseModel](https://docs.pydantic.dev/usage/models):

* You can use it with DocArray [Typed](docarray.typing) that are oriented toward Multimodal (image, audio, etc) data and for
Machine Learning use case TODO link the type section.
* [BaseDoc][docarray.base_doc.doc.BaseDoc] has an `id` field (generated by default) to uniquely identify a Document.

## Representing multimodal and nested data

Let's say you want to represent a YouTube video in your application, perhaps to build a search system for YouTube videos.
Expand Down