diff --git a/Directory.Packages.props b/Directory.Packages.props
index 7c560380f..40dd3ce27 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -10,10 +10,10 @@
-
-
-
-
+
+
+
+
@@ -33,18 +33,18 @@
-
+
-
+
-
-
+
+
@@ -56,11 +56,11 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -71,9 +71,9 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/examples/002-dotnet-SemanticKernelPlugin/002-dotnet-SemanticKernelPlugin.csproj b/examples/002-dotnet-SemanticKernelPlugin/002-dotnet-SemanticKernelPlugin.csproj
index 9e8866b54..a70d135c7 100644
--- a/examples/002-dotnet-SemanticKernelPlugin/002-dotnet-SemanticKernelPlugin.csproj
+++ b/examples/002-dotnet-SemanticKernelPlugin/002-dotnet-SemanticKernelPlugin.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/examples/206-dotnet-configuration-and-logging/206-dotnet-configuration-and-logging.csproj b/examples/206-dotnet-configuration-and-logging/206-dotnet-configuration-and-logging.csproj
index 2131e6f88..d0a5ec389 100644
--- a/examples/206-dotnet-configuration-and-logging/206-dotnet-configuration-and-logging.csproj
+++ b/examples/206-dotnet-configuration-and-logging/206-dotnet-configuration-and-logging.csproj
@@ -29,7 +29,7 @@
-
+
diff --git a/extensions/LlamaSharp/LlamaSharp/LlamaSharpTextGenerator.cs b/extensions/LlamaSharp/LlamaSharp/LlamaSharpTextGenerator.cs
index 5adb333ff..13836ed67 100644
--- a/extensions/LlamaSharp/LlamaSharp/LlamaSharpTextGenerator.cs
+++ b/extensions/LlamaSharp/LlamaSharp/LlamaSharpTextGenerator.cs
@@ -107,7 +107,7 @@ public IAsyncEnumerable GenerateTextAsync(
PresencePenalty = (float)options.PresencePenalty,
FrequencyPenalty = (float)options.FrequencyPenalty,
AntiPrompts = options.StopSequences.ToList(),
- LogitBias = options.TokenSelectionBiases,
+ LogitBias = new(),
// RepeatLastTokensCount = 0, // [int] last n tokens to penalize (0 = disable penalty, -1 = context size)
// TopK = 0, // [int] The number of highest probability vocabulary tokens to keep for top-k-filtering.
// MinP = 0, // [float]
@@ -120,6 +120,12 @@ public IAsyncEnumerable GenerateTextAsync(
// Mirostat = MirostatType.Disable, // see https://github.com/basusourya/mirostat
// Grammar = null // SafeLLamaGrammarHandle
};
+
+ foreach (KeyValuePair b in options.TokenSelectionBiases)
+ {
+ settings.LogitBias!.Add(b.Key, b.Value);
+ }
+
return executor.InferAsync(prompt, settings, cancellationToken);
}
diff --git a/service/Service/Service.csproj b/service/Service/Service.csproj
index c45c6971f..716beb695 100644
--- a/service/Service/Service.csproj
+++ b/service/Service/Service.csproj
@@ -66,11 +66,11 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive