This commit is contained in:
cotran 2024-12-09 13:33:10 -08:00
parent 3b0ba352a9
commit 63cc2ef3f3

View file

@ -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