MCPcopy Create free account
hub / github.com/SillyTavern/Extension-WebSearch / canUseFunctionTool

Function canUseFunctionTool

index.js:218–226  ·  view source on GitHub ↗

* Determines whether the function tool can be used. * @returns {boolean} Whether the function tool can be used

()

Source from the content-addressed store, hash-verified

216 * @returns {boolean} Whether the function tool can be used
217 */
218function canUseFunctionTool() {
219 const { isToolCallingSupported } = SillyTavern.getContext();
220 if (typeof isToolCallingSupported !== 'function') {
221 console.debug('WebSearch: tool calling is not supported');
222 return false;
223 }
224
225 return isToolCallingSupported();
226}
227
228async function onWebSearchPrompt(chat, _maxContext, _abort, type) {
229 if (type === 'quiet') {

Callers 1

onWebSearchPromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected