[Frontend] create unified Cohere parser (#56392)
Signed-off-by: walterbm <walter.beller.morales@gmail.com> Co-authored-by: Flora Feng <4florafeng@gmail.com>
This commit is contained in:
co-authored by
Flora Feng
parent
d406f09eb8
commit
756794a9a7
@@ -126,6 +126,21 @@ class ParserManager:
|
||||
|
||||
return _KimiK3Parser
|
||||
|
||||
if {reasoning_parser_name, tool_parser_name} & {
|
||||
"cohere_command3",
|
||||
"cohere_command4",
|
||||
}:
|
||||
from vllm.parser.cohere_command import CohereCommandParser
|
||||
|
||||
r_cls = reasoning_parser_cls
|
||||
t_cls = tool_parser_cls
|
||||
|
||||
class _CohereCommandParser(CohereCommandParser):
|
||||
reasoning_parser_cls = r_cls
|
||||
tool_parser_cls = t_cls
|
||||
|
||||
return _CohereCommandParser
|
||||
|
||||
from vllm.parser.abstract_parser import DelegatingParser
|
||||
|
||||
r_cls = reasoning_parser_cls
|
||||
|
||||
Reference in New Issue
Block a user