[Bugfix] Access get_vocab instead of vocab in tool parsers (#9188)
This commit is contained in:
@@ -61,8 +61,7 @@ class MistralToolParser(ToolParser):
|
||||
self.streamed_args_for_tool: List[str] = [
|
||||
] # map what has been streamed for each tool so far to a list
|
||||
self.bot_token = "[TOOL_CALLS]"
|
||||
self.bot_token_id = self.model_tokenizer.get_vocab().get(
|
||||
self.bot_token, None)
|
||||
self.bot_token_id = self.vocab.get(self.bot_token)
|
||||
self.tool_call_regex = re.compile(r"\[{.*?}\]", re.DOTALL)
|
||||
if not self.bot_token_id:
|
||||
raise RuntimeError(
|
||||
|
||||
Reference in New Issue
Block a user