address comments

This commit is contained in:
cotran 2024-11-26 09:45:27 -08:00
parent e44d189d86
commit e30bbe39e7
3 changed files with 51 additions and 32 deletions

View file

@ -52,7 +52,7 @@ def test_hallucination(case):
)
for token, logprob in zip(case["tokens"], case["logprobs"]):
if token != "</tool_call>":
state.check_token_hallucination(token, logprob)
state.append_and_check_token_hallucination(token, logprob)
if state.hallucination:
break
assert state.hallucination == case["expect"]