mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 22:47:21 +00:00
Fixed the tokenizer path in exported provider configurations (#1076)
This commit is contained in:
1 parent
22065783c2
commit
d333720f3f
12 files changed
+451
-23
No files matched your search
@@ -3,6 +3,7 @@ using System.Text.Json.Serialization;
|
||||
using AIStudio.Provider;
|
||||
using AIStudio.Provider.HuggingFace;
|
||||
using AIStudio.Tools.PluginSystem;
|
||||
using AIStudio.Tools.Services;
|
||||
|
||||
using SharedTools;
|
||||
|
||||
@@ -257,13 +258,15 @@ public sealed record EmbeddingProvider(
|
||||
""";
|
||||
}
|
||||
|
||||
var tokenizerPathLine = ExportedTokenizerPath.BuildLuaField(this.TokenizerPath, TokenizerModelId.ForEmbeddingProvider(this), " ");
|
||||
|
||||
return $$"""
|
||||
CONFIG["EMBEDDING_PROVIDERS"][#CONFIG["EMBEDDING_PROVIDERS"]+1] = {
|
||||
["Id"] = "{{Guid.NewGuid().ToString()}}",
|
||||
["Name"] = "{{LuaTools.EscapeLuaString(this.Name)}}",
|
||||
["UsedLLMProvider"] = "{{this.UsedLLMProvider}}",
|
||||
|
||||
["TokenizerPath"] = "{{LuaTools.EscapeLuaString(this.TokenizerPath)}}",
|
||||
{{tokenizerPathLine}}
|
||||
["TokenLimit"] = {{this.EffectiveTokenLimit}},
|
||||
["EmbeddingBatchSize"] = {{this.EffectiveEmbeddingBatchSize}},
|
||||
|
||||
|
||||
Reference in new issue
Block a user