* Determines whether the function tool can be used. * @returns {boolean} Whether the function tool can be used
()
| 216 | * @returns {boolean} Whether the function tool can be used |
| 217 | */ |
| 218 | function 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 | |
| 228 | async function onWebSearchPrompt(chat, _maxContext, _abort, type) { |
| 229 | if (type === 'quiet') { |