mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-30 09:13:40 +00:00
Use parameters which is in keeping with other standard practices.
Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
parent
27b86dae21
commit
5fc2ff8e69
@ -860,18 +860,18 @@ bool ChatLLM::promptInternal(const QList<QString> &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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user