Description
name: Wrapper for Non Tool-Calling Models to Enable Auto Function Invocation
about:
A wrapper to simulate tool-calling functionality for models that lack native support.
Context Preparation:
From the ongoing request, the wrapper creates a context.tool_calling object containing request.functions, request.function_call_method, and related info about formatting the response for function calling.
Request Encoding:
The wrapper injects context.tool_calling into request.messages with appropriate AuthorRole to embed tool call instructions into the prompt
Response Parsing:
The wrapper parses the combined model response—which contains both standard reply and simulated tool call data—and splits it into separate objects, matching the structure of native tool-calling model responses before forwarding to Semantic Kernel.