From b98501c786e985865bd6d607d40610013f5be55b Mon Sep 17 00:00:00 2001 From: AT Date: Fri, 24 Jan 2025 10:26:24 -0500 Subject: [PATCH] Fix regression while using localdocs with server API. (#3410) Signed-off-by: Adam Treat --- gpt4all-chat/CHANGELOG.md | 5 +++++ gpt4all-chat/src/chatllm.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gpt4all-chat/CHANGELOG.md b/gpt4all-chat/CHANGELOG.md index 1b7b7858..5f530a29 100644 --- a/gpt4all-chat/CHANGELOG.md +++ b/gpt4all-chat/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [Unreleased] + +### Fixed +- Fix regression while using localdocs with server API ([#3410](https://github.com/nomic-ai/gpt4all/pull/3410)) + ## [3.7.0] - 2025-01-21 ### Added diff --git a/gpt4all-chat/src/chatllm.cpp b/gpt4all-chat/src/chatllm.cpp index e5a46bf6..5fe5f41c 100644 --- a/gpt4all-chat/src/chatllm.cpp +++ b/gpt4all-chat/src/chatllm.cpp @@ -869,7 +869,7 @@ auto ChatLLM::promptInternalChat(const QStringList &enabledCollections, const LL auto &[promptIndex, queryStr] = *query; const int retrievalSize = MySettings::globalInstance()->localDocsRetrievalSize(); emit requestRetrieveFromDB(enabledCollections, queryStr, retrievalSize, &databaseResults); // blocks - m_chatModel->updateSources(promptIndex, databaseResults); + m_chatModel->updateSources(promptIndex + startOffset, databaseResults); emit databaseResultsChanged(databaseResults); } }