Skip to content

Commit

Permalink
Update M.E.AI.Abstractions version
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Nov 13, 2024
1 parent 2c50ced commit a235836
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
<PackageVersion Include="Microsoft.DeepDev.TokenizerLib" Version="1.3.3" />
<PackageVersion Include="SharpToken" Version="2.0.3" />
<!-- Microsoft.Extensions.* -->
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.0.0-preview.9.24525.1" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.0-preview.9.24525.1" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.0.0-preview.9.24556.5" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.0-preview.9.24556.5" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ public async IAsyncEnumerable<StreamingChatMessageContent> GetStreamingChatMessa
{
options.TopK = topK;
}
else if (entry.Key.Equals("seed", StringComparison.OrdinalIgnoreCase) &&
TryConvert(entry.Value, out long seed))
{
options.Seed = seed;
}
else if (entry.Key.Equals("max_tokens", StringComparison.OrdinalIgnoreCase) &&
TryConvert(entry.Value, out int maxTokens))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ public void Dispose()
settings.ExtensionData["top_k"] = options.TopK.Value;
}

if (options.Seed is not null)
{
settings.ExtensionData["seed"] = options.Seed.Value;
}

if (options.ResponseFormat is not null)
{
if (options.ResponseFormat is ChatResponseFormatText)
Expand Down

0 comments on commit a235836

Please sign in to comment.