mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-12 05:53:48 +00:00
Merge branch 'main' into feature/configurable-transcription-bitrate
This commit is contained in:
53 files changed
+1992
-494
No files matched your search
@@ -497,7 +497,17 @@ public sealed record PluginConfigurationObject
|
||||
TokenizerModelId.ForEmbeddingProvider(provider),
|
||||
$"embedding provider '{provider.Name}'");
|
||||
|
||||
return provider with { TokenizerPath = syncedTokenizerPath };
|
||||
//
|
||||
// The embedding signature is built from the tokenizer's content, so the fingerprint travels
|
||||
// with the provider. An unreadable file yields nothing, and writing that would look like
|
||||
// another tokenizer and cost every data source of this provider its index -- so in that case
|
||||
// the previous fingerprint is kept rather than cleared.
|
||||
//
|
||||
var syncedTokenizerFingerprint = await TokenizerFingerprint.ForFileAsync(syncedTokenizerPath);
|
||||
if (string.IsNullOrEmpty(syncedTokenizerFingerprint) && !string.IsNullOrWhiteSpace(syncedTokenizerPath))
|
||||
syncedTokenizerFingerprint = provider.TokenizerFingerprint;
|
||||
|
||||
return provider with { TokenizerPath = syncedTokenizerPath, TokenizerFingerprint = syncedTokenizerFingerprint };
|
||||
}
|
||||
|
||||
private static async Task<string> SyncTokenizerAsync(string configuredTokenizerPath, string pluginPath, string modelId, string logName)
|
||||
|
||||
Reference in new issue
Block a user