Reframr-RFM-v2-Base / reframr /reasoning.py
OkeyMeta's picture
Add Reframr-RFM-v2-Base release files
52da7b7 verified
TOKENIZER_NAME = "FrameToken"
TOOL_PROTOCOL_TOKENS: tuple[str, ...] = (
"<tool_call>",
"<tool_result>",
"<source>",
"<final>",
)
REASONING_CONTROL_TOKENS: tuple[str, ...] = (
"<reason>",
"<plan>",
"<reflect>",
"<answer>",
"<memory>",
"<retrieve>",
"<focus>",
"<verify>",
"<tool>",
*TOOL_PROTOCOL_TOKENS,
)
REASONING_PROFILES: dict[str, tuple[str, ...]] = {
"none": (),
"deep": ("<reason>",),
"memory": ("<memory>", "<retrieve>", "<focus>"),
"tool": ("<tool>", "<retrieve>", "<tool_call>", "<verify>"),
}
def reasoning_prefix(mode: str) -> list[str]:
if mode not in REASONING_PROFILES:
raise ValueError(f"Unknown reasoning mode: {mode}")
return list(REASONING_PROFILES[mode])