Function: gptel--map-tool-args
gptel--map-tool-args is a natively compiled function defined in
gptel-request.el.
Signature
(gptel--map-tool-args TOOL-SPEC ARGS)
Documentation
Create a tool call argument list from TOOL-SPEC and ARGS.
TOOL-SPEC is a gptel-tool and ARGS is a plist of arguments for a tool
call. The argument list is suitable for supplying to the tool function.
Source Code
;; Defined in /nix/store/q3r7g81pvghw7a523kjk2k2zih3pfk8z-emacs-packages-deps/share/emacs/site-lisp/elpa/gptel-20261002.545/gptel-request.el
(defun gptel--map-tool-args (tool-spec args)
"Create a tool call argument list from TOOL-SPEC and ARGS.
TOOL-SPEC is a `gptel-tool' and ARGS is a plist of arguments for a tool
call. The argument list is suitable for supplying to the tool function."
(mapcar
(lambda (arg)
(let ((key (intern (concat ":" (plist-get arg :name)))))
(plist-get args key)))
(gptel-tool-args tool-spec)))