From 06bfed67b2c25a102cd2660b7af78af9efc2fe12 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Sat, 20 Apr 2024 23:40:03 +0200 Subject: [PATCH] Fix backward compatibility with test code --- src/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 80af303..bb54edb 100644 --- a/src/main.py +++ b/src/main.py @@ -51,7 +51,9 @@ def deserializeFromJSON( self, data, marker, index_vectors ,index_content, searc shape=None data=json.loads(data) for part in data: - [text,embeddings_b64,_dtype,_shape, part_marker] = part + [text,embeddings_b64,_dtype,_shape] = part + part_marker=part[4] if len(part)>3 else None + if dtype is None: dtype = _dtype elif dtype != _dtype: raise Exception("Data type mismatch") if shape is None: shape = _shape