fixed refactored code
Some checks failed
Security Scan / dependency-check (pull_request) Successful in 38s
Security Scan / security (pull_request) Successful in 41s
Test Suite / lint (pull_request) Failing after 28s
Test Suite / test (3.11) (pull_request) Successful in 1m27s
Test Suite / build (pull_request) Has been skipped
Some checks failed
Security Scan / dependency-check (pull_request) Successful in 38s
Security Scan / security (pull_request) Successful in 41s
Test Suite / lint (pull_request) Failing after 28s
Test Suite / test (3.11) (pull_request) Successful in 1m27s
Test Suite / build (pull_request) Has been skipped
This commit is contained in:
2
example/bad/bad_binary_content.ndjson
Normal file
2
example/bad/bad_binary_content.ndjson
Normal file
@@ -0,0 +1,2 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>{"id": "doc_001", "embedding": [0.1, -0.3, 0.7, 0.2], "text": "Binary junk at start"}
|
||||
{"id": "doc_002", "embedding": [0.5, 0.1, -0.2, 0.8], "text": "Normal line"}<7D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
6
example/bad/bad_empty_lines.ndjson
Normal file
6
example/bad/bad_empty_lines.ndjson
Normal file
@@ -0,0 +1,6 @@
|
||||
{"id": "doc_001", "embedding": [0.1, -0.3, 0.7, 0.2], "text": "First line"}
|
||||
|
||||
{"id": "doc_002", "embedding": [0.5, 0.1, -0.2, 0.8], "text": "After empty line"}
|
||||
|
||||
|
||||
{"id": "doc_003", "embedding": [0.3, 0.4, 0.1, -0.1], "text": "After multiple empty lines"}
|
4
example/bad/bad_inconsistent_dimensions.ndjson
Normal file
4
example/bad/bad_inconsistent_dimensions.ndjson
Normal file
@@ -0,0 +1,4 @@
|
||||
{"id": "doc_001", "embedding": [0.1, -0.3, 0.7, 0.2], "text": "4D embedding"}
|
||||
{"id": "doc_002", "embedding": [0.5, 0.1, -0.2], "text": "3D embedding"}
|
||||
{"id": "doc_003", "embedding": [0.3, 0.4, 0.1, -0.1, 0.8], "text": "5D embedding"}
|
||||
{"id": "doc_004", "embedding": [0.2, 0.1], "text": "2D embedding"}
|
8
example/bad/bad_invalid_embeddings.ndjson
Normal file
8
example/bad/bad_invalid_embeddings.ndjson
Normal file
@@ -0,0 +1,8 @@
|
||||
{"id": "doc_001", "embedding": "not_an_array", "text": "Embedding as string"}
|
||||
{"id": "doc_002", "embedding": [0.1, "text", 0.7, 0.2], "text": "Mixed types in embedding"}
|
||||
{"id": "doc_003", "embedding": [], "text": "Empty embedding array"}
|
||||
{"id": "doc_004", "embedding": [0.1], "text": "Single dimension embedding"}
|
||||
{"id": "doc_005", "embedding": null, "text": "Null embedding"}
|
||||
{"id": "doc_006", "embedding": [0.1, 0.2, null, 0.4], "text": "Null value in embedding"}
|
||||
{"id": "doc_007", "embedding": [0.1, 0.2, "NaN", 0.4], "text": "String NaN in embedding"}
|
||||
{"id": "doc_008", "embedding": [0.1, 0.2, Infinity, 0.4], "text": "Infinity in embedding"}
|
5
example/bad/bad_malformed_json.ndjson
Normal file
5
example/bad/bad_malformed_json.ndjson
Normal file
@@ -0,0 +1,5 @@
|
||||
{"id": "doc_001", "embedding": [0.1, -0.3, 0.7, "text": "Valid line"}
|
||||
{"id": "doc_002", "embedding": [0.5, 0.1, -0.2, 0.8], "text": "Missing closing brace"
|
||||
{"id": "doc_003" "embedding": [0.3, 0.4, 0.1, -0.1], "text": "Missing colon after id"}
|
||||
{id: "doc_004", "embedding": [0.2, 0.1, 0.3, 0.4], "text": "Unquoted key"}
|
||||
{"id": "doc_005", "embedding": [0.1, 0.2, 0.3, 0.4], "text": "Valid line again"}
|
3
example/bad/bad_missing_embedding.ndjson
Normal file
3
example/bad/bad_missing_embedding.ndjson
Normal file
@@ -0,0 +1,3 @@
|
||||
{"id": "doc_001", "text": "Sample text without embedding field", "category": "test"}
|
||||
{"id": "doc_002", "text": "Another text without embedding", "category": "test"}
|
||||
{"id": "doc_003", "text": "Third text missing embedding", "category": "test"}
|
3
example/bad/bad_missing_text.ndjson
Normal file
3
example/bad/bad_missing_text.ndjson
Normal file
@@ -0,0 +1,3 @@
|
||||
{"id": "doc_001", "embedding": [0.1, -0.3, 0.7, 0.2], "category": "test"}
|
||||
{"id": "doc_002", "embedding": [0.5, 0.1, -0.2, 0.8], "category": "test"}
|
||||
{"id": "doc_003", "embedding": [0.3, 0.4, 0.1, -0.1], "category": "test"}
|
4
example/bad/bad_not_ndjson.json
Normal file
4
example/bad/bad_not_ndjson.json
Normal file
@@ -0,0 +1,4 @@
|
||||
[
|
||||
{"id": "doc_001", "embedding": [0.1, -0.3, 0.7, 0.2], "text": "Regular JSON array"},
|
||||
{"id": "doc_002", "embedding": [0.5, 0.1, -0.2, 0.8], "text": "Instead of NDJSON"}
|
||||
]
|
Reference in New Issue
Block a user