[BFCL] 关于 Qwen2.5-Instruct 定制处理器实现的问题,已针对 Rlla-4k (BFCL-v4) 进行微调
[cite_start]To ensure a fair evaluation of the model's true capabilities, I created a custom handler extending OSSHandler that handles both FC and Prompt modes[cite: 292].
[cite_start]1. Overriding _format_prompt:
I bypass the native tools injection and manually construct the system prompt and multi-turn history to exactly match the Rlla-4k training format[cite: 160]. [cite_start]Then, I pass this modified string through apply_chat_template (without the tools parameter) just to wrap the base <|im_start|> and <|im_end|> tags[cite: 168].
[cite_start]2. Overriding _extract_tool_calls (Robust JSON parsing & Key mapping): Since the model outputs JSON-lines inside <tool_call> tags and uses "parameters", I implemented a line-by-line extraction and a key mapping logic before returning the calls to the BFCL evaluator[cite: 180, 181]:
内容来源: ShishirPatil/gorilla