diff --git a/fastdeploy/entrypoints/engine_client.py b/fastdeploy/entrypoints/engine_client.py index 573432883ca..62ff9e3c0fc 100644 --- a/fastdeploy/entrypoints/engine_client.py +++ b/fastdeploy/entrypoints/engine_client.py @@ -173,7 +173,7 @@ async def add_requests(self, task): task["preprocess_start_time"] = time.time() try: chat_template_kwargs = task.get("chat_template_kwargs") or {} - chat_template_kwargs.update({"chat_template": task.get("chat_template"), "tools": task.get("tools")}) + chat_template_kwargs.update({"chat_template": task.get("chat_template")}) task["chat_template_kwargs"] = chat_template_kwargs if inspect.iscoroutinefunction(self.data_processor.process_request_dict): await self.data_processor.process_request_dict(task, self.max_model_len) diff --git a/tests/entrypoints/test_engine_client.py b/tests/entrypoints/test_engine_client.py index e11fa54939e..5ff14771c4a 100644 --- a/tests/entrypoints/test_engine_client.py +++ b/tests/entrypoints/test_engine_client.py @@ -27,9 +27,10 @@ async def test_add_request(self): await self.engine_client.add_requests(request) assert "chat_template" in request["chat_template_kwargs"], "'chat_template' not found in 'chat_template_kwargs" - assert "tools" in request["chat_template_kwargs"], "'tools' not found in 'chat_template_kwargs'" + # assert "tools" in request["chat_template_kwargs"], "'tools' not found in 'chat_template_kwargs'" assert request["chat_template_kwargs"]["chat_template"] == "Hello" - assert request["chat_template_kwargs"]["tools"] == [1] + assert request["tools"] == [1] + # assert request["chat_template_kwargs"]["tools"] == [1] if __name__ == "__main__":