ProtectedcreateCreates a ChatToolContext by enriching a ToolInvocationContext with chat-specific data.
The chat request providing context
Optionalctx: ToolInvocationContextThe base tool invocation context
A ChatToolContext with request, response, and cancellation token
Extracts tool requests from a chat request and wraps them to provide chat context.
The chat request containing tool requests
Tool requests with handlers that receive ChatToolContext
ProtectedtoWraps a single tool request to provide chat context to its handler. The returned tool request accepts ToolInvocationContext but internally enriches it to ChatToolContext before passing to the original handler.
The original tool request
The chat request to use for context
A wrapped tool request
Wraps multiple tool requests to provide chat context to their handlers.
The original tool requests
The chat request to use for context
Wrapped tool requests whose handlers receive ChatToolContext
Wraps tool requests in a chat context.
This service extracts tool requests from a given chat request model and wraps their handler functions to provide additional context, such as the chat request model.