-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: encode text first when both text and uri are presented #795
Conversation
Codecov Report
@@ Coverage Diff @@
## main #795 +/- ##
==========================================
+ Coverage 83.75% 83.79% +0.04%
==========================================
Files 21 21
Lines 1440 1438 -2
==========================================
- Hits 1206 1205 -1
+ Misses 234 233 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Document(text='goodbye, world'), | ||
Document( | ||
text='hello, world', | ||
uri='https://docarray.jina.ai/_static/favicon.png', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also coverage the docs with blob
and tensor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tensor = [0, 1, 2, 3]
or tensor = np.array([0, 1, 2, 3])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥹
@ZiniuYu BTW, do we need also to update the client side? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In previous versions, when a doc contains both text and URI fields, clip_server will treat it as an image doc.
In this pr we encode text first since the text is a content attribute and URI is only a source of content.
So now when a doc has text and URI fields, we will consider it as a text doc.