Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -21,7 +21,7 @@ class EndpointHandler:
|
|
| 21 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
| 22 |
text = data.get("text", None)
|
| 23 |
if text is not None:
|
| 24 |
-
assert isinstance(text,
|
| 25 |
return self.query_embedder.run(text)
|
| 26 |
|
| 27 |
documents = data.get("documents", None)
|
|
|
|
| 21 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
| 22 |
text = data.get("text", None)
|
| 23 |
if text is not None:
|
| 24 |
+
assert isinstance(text, str), "Expected text to be a string"
|
| 25 |
return self.query_embedder.run(text)
|
| 26 |
|
| 27 |
documents = data.get("documents", None)
|