Skip to content

Commit

Permalink
fix model cache issue with Web UI
Browse files Browse the repository at this point in the history
  • Loading branch information
jparkerweb committed Nov 8, 2024
1 parent 074235f commit 0c976da
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [2.2.4] - 2024-11-08
### Fixed
- Fixed issue with Web UI embedding cache not being cleared when a new model is initialized.

## [2.2.3] - 2024-11-07
### Added
- Web UI adjustments for display of truncated JSON results on screen but still allowing download of full results.
Expand Down
3 changes: 3 additions & 0 deletions embeddingUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export async function initializeEmbeddingUtils(onnxEmbeddingModel, onnxEmbedding
quantized: onnxEmbeddingModelQuantized,
});

// Clear the embedding cache when initializing with a new model
embeddingCache.clear();

return {
modelName: onnxEmbeddingModel,
isQuantized: onnxEmbeddingModelQuantized
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "semantic-chunking",
"version": "2.2.3",
"version": "2.2.4",
"description": "Semantically create chunks from large texts. Useful for workflows involving large language models (LLMs).",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions webui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "semantic-chunking-webui",
"version": "1.1.3",
"version": "1.1.4",
"type": "module",
"description": "Web UI for semantic-chunking library",
"main": "server.js",
Expand Down

0 comments on commit 0c976da

Please sign in to comment.