From 5fc2ff8e69f7895974d8d821633fa44a846df820 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Thu, 1 Aug 2024 18:08:38 -0400 Subject: [PATCH] Use parameters which is in keeping with other standard practices. Signed-off-by: Adam Treat --- gpt4all-chat/chatllm.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpt4all-chat/chatllm.cpp b/gpt4all-chat/chatllm.cpp index ed209ed0..bea454ee 100644 --- a/gpt4all-chat/chatllm.cpp +++ b/gpt4all-chat/chatllm.cpp @@ -860,18 +860,18 @@ bool ChatLLM::promptInternal(const QList &collectionList, const QString } QJsonObject rootObject = toolCallDoc.object(); - if (!rootObject.contains("name") || !rootObject.contains("arguments")) { + if (!rootObject.contains("name") || !rootObject.contains("parameters")) { qWarning() << "ERROR: The tool call did not have required name and argument objects " << toolCall; return handleFailedToolCall(trimmed, elapsed); } const QString tool = toolCallDoc["name"].toString(); - const QJsonObject args = toolCallDoc["arguments"].toObject(); + const QJsonObject args = toolCallDoc["parameters"].toObject(); // FIXME: In the future this will try to match the tool call to a list of tools that are supported // according to MySettings, but for now only brave search is supported if (tool != "brave_search" || !args.contains("query")) { - qWarning() << "ERROR: Could not find the tool and correct arguments for " << toolCall; + qWarning() << "ERROR: Could not find the tool and correct parameters for " << toolCall; return handleFailedToolCall(trimmed, elapsed); }