import Qt5Compat.GraphicalEffects import QtCore import QtQuick import QtQuick.Controls import QtQuick.Controls.Basic import QtQuick.Layouts import chatlistmodel import download import gpt4all import llm import localdocs import modellist import mysettings import network Rectangle { id: window Theme { id: theme } property var currentChat: ChatListModel.currentChat property var chatModel: currentChat.chatModel signal addCollectionViewRequested() signal addModelViewRequested() color: theme.viewBackground Connections { target: currentChat function onResponseInProgressChanged() { if (MySettings.networkIsActive && !currentChat.responseInProgress) Network.sendConversation(currentChat.id, getConversationJson()); } function onModelLoadingErrorChanged() { if (currentChat.modelLoadingError !== "") modelLoadingErrorPopup.open() } function onModelLoadingWarning(warning) { modelLoadingWarningPopup.open_(warning) } } function currentModelName() { return ModelList.modelInfo(currentChat.modelInfo.id).name; } function currentModelInstalled() { return currentModelName() !== "" && ModelList.modelInfo(currentChat.modelInfo.id).installed; } PopupDialog { id: modelLoadingErrorPopup anchors.centerIn: parent shouldTimeOut: false text: qsTr("

Encountered an error loading model:


") + "\"" + currentChat.modelLoadingError + "\"" + qsTr("

Model loading failures can happen for a variety of reasons, but the most common " + "causes include a bad file format, an incomplete or corrupted download, the wrong file " + "type, not enough system RAM or an incompatible model type. Here are some suggestions for resolving the problem:" + "