Skip to content

armgit / uzu

Public Imported from GitHub
0

A high-performance inference engine for AI models

2.2 KB
Raw Blame
{
    "reduction": {
        "groups": [
            {
                "type": "bounded",
                "name": "message",
                "open_token": "<|im_start|>",
                "close_tokens": [
                    "<|im_end|>"
                ],
                "groups": [
                    {
                        "type": "greedy",
                        "name": "role",
                        "capturing_limit": 1
                    },
                    {
                        "type": "greedy",
                        "name": "content",
                        "groups": [
                            {
                                "type": "bounded",
                                "name": "reasoning",
                                "closes_on_sibling": true,
                                "open_token": "<think>",
                                "close_tokens": [
                                    "</think>"
                                ]
                            },
                            {
                                "type": "bounded",
                                "name": "tool_call",
                                "open_token": "<tool_call>",
                                "close_tokens": [
                                    "</tool_call>"
                                ]
                            },
                            {
                                "type": "bounded",
                                "name": "tool_call_result",
                                "open_token": "<tool_response>",
                                "close_tokens": [
                                    "</tool_response>"
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "transformation": {
        "tool_call": [
            {
                "type": "on",
                "field": "$finished",
                "with": "$value",
                "do": [
                    {
                        "type": "parse_json",
                        "repair": true
                    }
                ]
            }
        ]
    }
}