From e69b646d0f265dfa2beef4a53afc59875b3fb2d0 Mon Sep 17 00:00:00 2001 From: Sindhu Somasundaram <56774226+sindhuvahinis@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:55:30 -0700 Subject: [PATCH] Allow overriding truncate parameter in request (#953) (#957) Co-authored-by: Aaqib --- .../setup/djl_python/rolling_batch/lmi_dist_rolling_batch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/python/setup/djl_python/rolling_batch/lmi_dist_rolling_batch.py b/engines/python/setup/djl_python/rolling_batch/lmi_dist_rolling_batch.py index a69a6e29f..16e61f153 100644 --- a/engines/python/setup/djl_python/rolling_batch/lmi_dist_rolling_batch.py +++ b/engines/python/setup/djl_python/rolling_batch/lmi_dist_rolling_batch.py @@ -151,7 +151,8 @@ def preprocess_requests(self, requests, **kwargs): id=r.id, inputs=r.input_text, parameters=parameters, - stopping_parameters=stop_parameters)) + stopping_parameters=stop_parameters, + truncate=param.get("truncate", 1000))) if preprocessed_requests: batch = Batch(id=self.batch_id_counter,