初始化项目,由ModelHub XC社区提供模型
Model: applexml/kimi-k2 Source: Original Platform
This commit is contained in:
25
tool_declaration_ts.py
Normal file
25
tool_declaration_ts.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# tool_declaration_ts.py - Stub for Kimi tool/function-calling support
|
||||
# Loaded by EXO via importlib before tokenization_kimi.py is exec()'d.
|
||||
# Must exist to prevent ImportError in tokenization_kimi.py relative-import path.
|
||||
|
||||
"""
|
||||
Minimal tool-declaration stub for the Kimi tokenizer PoC.
|
||||
The real Kimi model uses this module for tool/function-call schema support.
|
||||
"""
|
||||
|
||||
# Stub constants expected by some tokenization_kimi variants
|
||||
TOOL_CALL_START = "<|tool_call_begin|>"
|
||||
TOOL_CALL_END = "<|tool_call_end|>"
|
||||
TOOL_CALL_ARG_BEGIN = "<|tool_call_argument_begin|>"
|
||||
|
||||
|
||||
def build_tool_declaration(name: str, description: str = "", params: dict = None) -> dict:
|
||||
"""Stub — returns a minimal tool declaration dict."""
|
||||
return {
|
||||
"name": name,
|
||||
"description": description,
|
||||
"parameters": params or {},
|
||||
}
|
||||
|
||||
|
||||
print("[PoC] tool_declaration_ts.py stub loaded")
|
||||
Reference in New Issue
Block a user