File size: 608 Bytes
2147ce8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
TOKENIZER_NAME = "FrameToken"

REASONING_CONTROL_TOKENS: tuple[str, ...] = (
    "<reason>",
    "<plan>",
    "<reflect>",
    "<answer>",
    "<memory>",
    "<retrieve>",
    "<focus>",
    "<verify>",
    "<tool>",
)

REASONING_PROFILES: dict[str, tuple[str, ...]] = {
    "none": (),
    "deep": ("<reason>",),
    "memory": ("<memory>", "<retrieve>", "<focus>"),
    "tool": ("<tool>", "<reason>", "<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])