From 63cc2ef3f352a317b10151c0312834cb9762d625 Mon Sep 17 00:00:00 2001 From: cotran Date: Mon, 9 Dec 2024 13:33:10 -0800 Subject: [PATCH] fix bug --- model_server/src/core/function_calling.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model_server/src/core/function_calling.py b/model_server/src/core/function_calling.py index 6b3bc6d6..23eb441b 100644 --- a/model_server/src/core/function_calling.py +++ b/model_server/src/core/function_calling.py @@ -495,8 +495,7 @@ class ArchFunctionHandler(ArchBaseHandler): model_response = prefill_response.choices[0].message.content break - # start parameter gathering if the model is not generating tool calls - if self.hallu_handler.hallucination == False: + if has_tool_call and self.hallu_handler.hallucination == False: model_response = "".join(self.hallu_handler.tokens) # start parameter gathering if the model is not generating tool calls