mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-30 08:37:20 +00:00
* Adding support for table Documents when serializing Labels in Haystack * Fix table label equality test * Add serialization support and __eq__ support for table answers * Made convenience functions for converting dataframes. Added some TODOs. Epxanded schema tests for table labels. Updated Multilabel to not convert Dataframes into strings. * get Answer and Label to_json working with DataFrame * Fix from_dict method of Label * Use Dict and remove unneccessary if check * Using pydantic instead of builtins for type detection * Update haystack/schema.py Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> * Update haystack/schema.py Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> * Update haystack/schema.py Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> * Separated table label equivalency tests and added pytest.mark.unit * Added unit test for _dict_factory * Using more descriptive variable names * Adding json files to test to_json and from_json functions * Added sample files for tests --------- Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
42 lines
521 B
JSON
42 lines
521 B
JSON
{
|
|
"content": [
|
|
[
|
|
"actors",
|
|
"age",
|
|
"number of movies",
|
|
"date of birth"
|
|
],
|
|
[
|
|
"brad pitt",
|
|
58,
|
|
87,
|
|
"18 december 1963"
|
|
],
|
|
[
|
|
"leonardo di caprio",
|
|
47,
|
|
53,
|
|
"11 november 1974"
|
|
],
|
|
[
|
|
"george clooney",
|
|
60,
|
|
69,
|
|
"6 may 1961"
|
|
]
|
|
],
|
|
"content_type": "table",
|
|
"score": null,
|
|
"meta": {},
|
|
"id_hash_keys": [
|
|
"content"
|
|
],
|
|
"embedding": [
|
|
1.1,
|
|
2.2,
|
|
3.3,
|
|
4.4
|
|
],
|
|
"id": "doc2"
|
|
}
|