feat: multi modal document#188
Conversation
Codecov Report
@@ Coverage Diff @@
## main #188 +/- ##
==========================================
+ Coverage 84.91% 85.30% +0.39%
==========================================
Files 119 123 +4
Lines 5383 5677 +294
==========================================
+ Hits 4571 4843 +272
- Misses 812 834 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
winstonww
left a comment
There was a problem hiding this comment.
I also wonder what's the best way to handle optional parameters? For instance, for img: Optional[ImageDocument], should we append an empty chunk document or not in this case?
alaeddine-13
left a comment
There was a problem hiding this comment.
also add test about support of default values in dataclass and see if it works
| } | ||
|
|
||
| elif isinstance(field.type, typing._GenericAlias): | ||
| if field.type._name in ['List', 'Iterable']: |
There was a problem hiding this comment.
I find it better to stick to the type that the user explicitly provided.
If we rely on the dynamic type, we will introduce an implicit behaviour to the user
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
feat: multi modal document
Usage:
create schema:
create mm_doc:
translate to Document:
traverse a DocumentArray of mm_docs:
traverse with slice:
Note: the syntax of traversal paths is extended, there should be no breaking changes (e.g, old
r1:5c:3syntax is still accepted)