mirror of
https://github.com/katanemo/plano.git
synced 2026-06-23 15:38:07 +02:00
add more test
This commit is contained in:
parent
63cc2ef3f3
commit
f13947732c
5 changed files with 162 additions and 236 deletions
|
|
@ -480,7 +480,7 @@ class ArchFunctionHandler(ArchBaseHandler):
|
|||
|
||||
model_response, has_tool_call = "", None
|
||||
|
||||
for token in self.hallu_handler:
|
||||
for _ in self.hallu_handler:
|
||||
# check if the first token is <tool_call>
|
||||
if len(self.hallu_handler.tokens) > 0 and has_tool_call == None:
|
||||
if self.hallu_handler.tokens[0] == "<tool_call>":
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ class MaskToken(Enum):
|
|||
|
||||
|
||||
HALLUCINATION_THRESHOLD_DICT = {
|
||||
MaskToken.TOOL_CALL.value: {"entropy": 0.001, "varentropy": 0.005},
|
||||
MaskToken.TOOL_CALL.value: {"entropy": 0.05, "varentropy": 0.25},
|
||||
MaskToken.PARAMETER_VALUE.value: {
|
||||
"entropy": 0.001,
|
||||
"varentropy": 0.005,
|
||||
"entropy": 0.05,
|
||||
"varentropy": 0.25,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue