(improvement)(chat) Fix embedded embedding model, some machines throw an error with version GLIBC_2.27 (#1346)

This commit is contained in:
lexluo09
2024-07-04 21:02:08 +08:00
committed by GitHub
parent bb4cd880b0
commit 93ea7a618c
4 changed files with 12 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ public class S2OnnxEmbeddingModel extends AbstractInProcessEmbeddingModel {
try {
return new OnnxBertBiEncoder(
Files.newInputStream(pathToModel),
vocabularyFile.openStream(),
vocabularyFile,
PoolingMode.MEAN
);
} catch (IOException e) {