diff --git a/pkgs/by-name/gp/gpt4all/embedding-local.patch b/pkgs/by-name/gp/gpt4all/embedding-local.patch index fee7702102ac..fb1563523223 100644 --- a/pkgs/by-name/gp/gpt4all/embedding-local.patch +++ b/pkgs/by-name/gp/gpt4all/embedding-local.patch @@ -1,13 +1,14 @@ -commit 1e8fdf3f90fd142c5ddd63e44ca1e5c172dbfb7f +commit 425b33877c819dd88f3692aae37452c767371f6b Author: Simon Gardling -Date: Tue Aug 27 12:45:14 2024 -0400 +Date: Thu Sep 19 10:00:39 2024 -0400 use locally downloaded embeddings -index 27f3f5d9..9e25528a 100644 ---- a/CMakeLists.txt +diff --git a/gpt4all-chat/CMakeLists.txt b/gpt4all-chat/CMakeLists.txt +index 900307ae..802fc31a 100644 +--- a//CMakeLists.txt +++ b/CMakeLists.txt -@@ -90,6 +90,7 @@ elseif (APPLE) +@@ -120,6 +120,7 @@ elseif (APPLE) endif() # Embedding model @@ -15,21 +16,21 @@ index 27f3f5d9..9e25528a 100644 set(LOCAL_EMBEDDING_MODEL "nomic-embed-text-v1.5.f16.gguf") set(LOCAL_EMBEDDING_MODEL_MD5 "a5401e7f7e46ed9fcaed5b60a281d547") set(LOCAL_EMBEDDING_MODEL_PATH "${CMAKE_BINARY_DIR}/resources/${LOCAL_EMBEDDING_MODEL}") -@@ -104,6 +105,7 @@ +@@ -134,6 +135,7 @@ message(STATUS "Embedding model downloaded to ${LOCAL_EMBEDDING_MODEL_PATH}") if (APPLE) list(APPEND CHAT_EXE_RESOURCES "${LOCAL_EMBEDDING_MODEL_PATH}") endif() +]] - qt_add_executable(chat - main.cpp -@@ -383,11 +385,13 @@ + set(QAPPLICATION_CLASS QGuiApplication) + add_subdirectory(deps/SingleApplication) +@@ -348,11 +350,13 @@ if (LLMODEL_CUDA) endif() endif() +#[[ if (NOT APPLE) - install(FILES "${CMAKE_BINARY_DIR}/resources/${LOCAL_EMBEDDING_MODEL}" + install(FILES "${LOCAL_EMBEDDING_MODEL_PATH}" DESTINATION resources COMPONENT ${COMPONENT_NAME_MAIN}) endif() @@ -37,8 +38,10 @@ index 27f3f5d9..9e25528a 100644 set(CPACK_GENERATOR "IFW") set(CPACK_VERBATIM_VARIABLES YES) ---- a/embllm.cpp -+++ b/embllm.cpp +diff --git a/gpt4all-chat/src/embllm.cpp b/gpt4all-chat/src/embllm.cpp +index 81b1e9e1..e3266cc7 100644 +--- a/src/embllm.cpp ++++ b/src/embllm.cpp @@ -84,7 +84,7 @@ bool EmbeddingLLMWorker::loadModel() QString filePath = embPathFmt.arg(QCoreApplication::applicationDirPath(), LOCAL_EMBEDDING_MODEL); @@ -47,4 +50,4 @@ index 27f3f5d9..9e25528a 100644 + qWarning() << "embllm WARNING: Local embedding model not found: " << filePath; return false; } - + diff --git a/pkgs/by-name/gp/gpt4all/package.nix b/pkgs/by-name/gp/gpt4all/package.nix index 7d4ecab1b7a2..938b9166897f 100644 --- a/pkgs/by-name/gp/gpt4all/package.nix +++ b/pkgs/by-name/gp/gpt4all/package.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "gpt4all"; - version = "3.2.1"; + version = "3.3.0"; src = fetchFromGitHub { fetchSubmodules = true; - hash = "sha256-h6hcqafTjQsqVlpnqVeohh38A67VSGrW3WrCErjaKIQ="; + hash = "sha256-aez/APsei30Tp1em/RDCuq+v8hOavHq4O9qZahrsF/g="; owner = "nomic-ai"; repo = "gpt4all"; rev = "v${finalAttrs.version}";