Documentation
¶
Overview ¶
Package toolcalls is the shared, backend-neutral machinery for model-native tool calls: serializing tool definitions for the model's own chat template, and parsing the model's raw output back into structured tool calls per a profile-declared protocol. The protocol is the format the model's OWN chat template emits (model-declared), not a Contenox-invented schema — so the same model behaves identically whether served by the llama or OpenVINO backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownProtocol = errors.New("toolcalls: unknown tool-call protocol")
ErrUnknownProtocol is returned for a declared protocol with no registered parser.
Functions ¶
func ParseHermes ¶
ParseHermes extracts <tool_call>{...}</tool_call> blocks (the Hermes/Qwen model-declared format) into neutral tool calls, returning the remaining visible text as content.
func ProtocolKnown ¶
ProtocolKnown reports whether a protocol name has a registered parser (used by profile validation to reject typos at load time).