Describe the feature
To give a more natureal FastAPI feeling, we can allow users to have request and response schemas with single BaseDocs (or even single Pydantic models).
Internally Jina can translate them into singleton DocLists lists.
TODO:
[ ] Create alias for docs and doc to allow natural feeling of sending a single Document.
[ ] Detect if the user inputs a List instead of a DocList and transform it to DocList
[ ] Detect if the user uses a BaseModel and not a BaseDoc and transform to BaseDoc
[ ] Once we have a single BaseDoc, internally wrap it into a DocList
[ ] For HTTP, potentially allow Union[Doc, List[Doc]].
Describe the feature To give a more natureal FastAPI feeling, we can allow users to have request and response schemas with single BaseDocs (or even single Pydantic models).
Internally Jina can translate them into singleton DocLists lists.
TODO:
docs
anddoc
to allow natural feeling of sending a single Document.