diff --git a/gpt4all-chat/CMakeLists.txt b/gpt4all-chat/CMakeLists.txt index f41afbd7..817497a5 100644 --- a/gpt4all-chat/CMakeLists.txt +++ b/gpt4all-chat/CMakeLists.txt @@ -138,7 +138,6 @@ qt_add_qml_module(chat qml/AddCollectionView.qml qml/AddModelView.qml qml/ApplicationSettings.qml - qml/BraveSearchSettings.qml qml/ChatDrawer.qml qml/ChatView.qml qml/CollectionsDrawer.qml @@ -178,6 +177,7 @@ qt_add_qml_module(chat qml/MyTextField.qml qml/MyToolButton.qml qml/MyWelcomeButton.qml + qml/WebSearchSettings.qml RESOURCES icons/antenna_1.svg icons/antenna_2.svg diff --git a/gpt4all-chat/bravesearch.h b/gpt4all-chat/bravesearch.h index 7450b7c8..872e230a 100644 --- a/gpt4all-chat/bravesearch.h +++ b/gpt4all-chat/bravesearch.h @@ -48,9 +48,9 @@ public: ToolEnums::Error error() const override { return m_error; } QString errorString() const override { return m_errorString; } - QString name() const override { return tr("Brave Web Search"); } - QString description() const override { return tr("Search the web using brave"); } - QString function() const override { return "brave_search"; } + QString name() const override { return tr("Web Search"); } + QString description() const override { return tr("Search the web"); } + QString function() const override { return "web_search"; } QJsonObject paramSchema() const override; QJsonObject exampleParams() const override; bool isBuiltin() const override { return true; } diff --git a/gpt4all-chat/chatllm.cpp b/gpt4all-chat/chatllm.cpp index 00bf86a7..3500c858 100644 --- a/gpt4all-chat/chatllm.cpp +++ b/gpt4all-chat/chatllm.cpp @@ -874,7 +874,7 @@ bool ChatLLM::promptInternal(const QList &collectionList, const QString // 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")) { + if (tool != "web_search" || !args.contains("query")) { // FIXME: Need to surface errors to the UI qWarning() << "ERROR: Could not find the tool and correct parameters for " << toolCall; return handleFailedToolCall(trimmed, elapsed); diff --git a/gpt4all-chat/qml/SettingsView.qml b/gpt4all-chat/qml/SettingsView.qml index 587a31b2..9a509313 100644 --- a/gpt4all-chat/qml/SettingsView.qml +++ b/gpt4all-chat/qml/SettingsView.qml @@ -35,7 +35,7 @@ Rectangle { title: qsTr("LocalDocs") } ListElement { - title: qsTr("Brave Web Search") + title: qsTr("Web Search") } } @@ -158,7 +158,7 @@ Rectangle { MySettingsStack { tabs: [ - Component { BraveSearchSettings { } } + Component { WebSearchSettings { } } ] } } diff --git a/gpt4all-chat/qml/BraveSearchSettings.qml b/gpt4all-chat/qml/WebSearchSettings.qml similarity index 97% rename from gpt4all-chat/qml/BraveSearchSettings.qml rename to gpt4all-chat/qml/WebSearchSettings.qml index bc189248..222f9e30 100644 --- a/gpt4all-chat/qml/BraveSearchSettings.qml +++ b/gpt4all-chat/qml/WebSearchSettings.qml @@ -16,7 +16,7 @@ MySettingsTab { showRestoreDefaultsButton: true - title: qsTr("Brave Web Search") + title: qsTr("Web Search") contentItem: ColumnLayout { id: root spacing: 30 @@ -27,7 +27,7 @@ MySettingsTab { color: theme.grayRed900 font.pixelSize: theme.fontSizeLarge font.bold: true - text: qsTr("Brave Web Search") + text: qsTr("Web Search") } Rectangle {