mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Tool Calling: Don't try to parse if tool calling is not supported
This commit is contained in:
parent
e7fe218810
commit
3fd7ca90ed
@ -365,6 +365,9 @@ export class ToolManager {
|
||||
* @returns {void}
|
||||
*/
|
||||
static parseToolCalls(toolCalls, parsed) {
|
||||
if (!this.isToolCallingSupported()) {
|
||||
return;
|
||||
}
|
||||
if (Array.isArray(parsed?.choices)) {
|
||||
for (const choice of parsed.choices) {
|
||||
const choiceIndex = (typeof choice.index === 'number') ? choice.index : null;
|
||||
|
Loading…
Reference in New Issue
Block a user