feat: add validate function to documents to have less verbose api#1058
feat: add validate function to documents to have less verbose api#1058samsja merged 7 commits intofeat-rewrite-v2from
Conversation
Signed-off-by: samsja <[email protected]>
JohannesMessner
left a comment
There was a problem hiding this comment.
Like it, but I think we should do the same for all of our default docs: identify the main content field and allow that to be passed directly. I think for most of the other ones that would be a tensor instead of str
|
yes I will add the resti n this pr as well for the other document what do we do if it is a string we pass to url ? @anna-charlotte what do u think ? |
So instead of identifying one main content field per predefined doc we decide based on the input data's type? Could also make sense, but lead to confusion if multiple fields have the same type. E.g. some Document might have two fields of type |
but we do this only for the one that make sense. But nothing automatic |
|
Yes, I like it, too, especially with `Text(text='some text') its too verbose, with the others I don't mind too much.
Yes not sure about this, too, could be a bit confusing maybe if for most we pass str to url, but for
What do u mean by this? |
Signed-off-by: samsja <[email protected]>
|
Signed-off-by: samsja <[email protected]>
Signed-off-by: samsja <[email protected]>
Signed-off-by: samsja <[email protected]>
Signed-off-by: samsja <[email protected]>
|
For the |
I forgot this one |
Signed-off-by: samsja <[email protected]>
|
📝 Docs are deployed on https://ft-feat-validate-docs--jina-docs.netlify.app 🎉 |
|
partially fix : #1056 |
Signed-off-by: samsja [email protected]
Comtext
Follow up on this : DocArray backlog
allow to pass directly a Text