-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Replaced instances of '@xenova/transformers' with '@huggingface/tra…
…nsformers' in multiple files to ensure consistency and compatibility with the latest version. - Updated the version of the @huggingface/transformers dependency from 3.1.1 to 3.1.2 in the transformers adapter and related connectors. - Enhanced the settings configuration in SmartEntities to clarify the minimum length description. - Removed the smart-instruct-model directory, including its package.json, README.md, and associated files, as part of a cleanup effort.
- Loading branch information
Brian Joseph Petro
committed
Dec 8, 2024
1 parent
6b630d1
commit d9ddcc7
Showing
13 changed files
with
18 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,12 @@ export class SmartEmbedTransformersIframeAdapter extends SmartEmbedIframeAdapter | |
this.connector = transformers_connector; | ||
if(this.settings.legacy_transformers || !this.use_gpu){ | ||
this.connector = this.connector | ||
.replace('@xenova/transformers', 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]') | ||
.replace('@huggingface/transformers', 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]') | ||
; | ||
this.use_gpu = false; | ||
} | ||
else this.connector = this.connector | ||
.replace('@xenova/transformers', 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected].1') | ||
.replace('@huggingface/transformers', 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected].2') | ||
; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ async function build_transformers_iframe_connector() { | |
target: 'es2020', | ||
outfile: join(__dirname, '../connectors/transformers_iframe.js'), | ||
write: false, | ||
external: ['@xenova/transformers'], | ||
external: ['@huggingface/transformers'], | ||
}); | ||
|
||
const outputContent = result.outputFiles[0].text; | ||
|
@@ -37,11 +37,11 @@ async function build_transformers_worker_connector() { | |
target: 'es2020', | ||
outfile: join(__dirname, '../connectors/transformers_worker.js'), | ||
write: false, | ||
external: ['@xenova/transformers'], | ||
external: ['@huggingface/transformers'], | ||
}); | ||
|
||
const connector = result.outputFiles[0].text | ||
.replace('@xenova/transformers', 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected].1') | ||
.replace('@huggingface/transformers', 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected].2') | ||
; | ||
writeFileSync(join(__dirname, '../connectors/transformers_worker.js'), connector); | ||
console.log('Build worker completed successfully.'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -736,7 +736,7 @@ var SmartEmbedTransformersAdapter = class extends SmartEmbedAdapter { | |
* @returns {Promise<void>} | ||
*/ | ||
async load_transformers() { | ||
const { pipeline, env, AutoTokenizer } = await import("https://cdn.jsdelivr.net/npm/@huggingface/[email protected].1"); | ||
const { pipeline, env, AutoTokenizer } = await import("https://cdn.jsdelivr.net/npm/@huggingface/[email protected].2"); | ||
env.allowLocalModels = false; | ||
const pipeline_opts = { | ||
quantized: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.