Skip to content

Commit

Permalink
Merge pull request #141 from stephentoub/updatemeai
Browse files Browse the repository at this point in the history
Update M.E.AI.Abstractions to 9.0.0-preview.9.24556.5
  • Loading branch information
awaescher authored Nov 13, 2024
2 parents 62081c7 + c4e16c4 commit 7567292
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/MicrosoftAi/AbstractionMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public static ChatRequest ToOllamaSharpChatRequest(IList<ChatMessage> chatMessag
{
FrequencyPenalty = options?.FrequencyPenalty,
PresencePenalty = options?.PresencePenalty,
Seed = (int?)options?.Seed,
Stop = options?.StopSequences?.ToArray(),
Temperature = options?.Temperature,
TopP = options?.TopP,
Expand Down
2 changes: 1 addition & 1 deletion src/OllamaSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.0-preview.9.24525.1" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.0-preview.9.24556.5" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions test/AbstractionMapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ public void Maps_Options()
ModelId = "llama3.1:405b",
PresencePenalty = 0.3f,
ResponseFormat = ChatResponseFormat.Json,
Seed = 11,
StopSequences = ["stop1", "stop2", "stop3"],
Temperature = 0.1f,
TopP = 10.1f
Expand All @@ -430,6 +431,7 @@ public void Maps_Options()
chatRequest.Options.Stop.Should().BeEquivalentTo("stop1", "stop2", "stop3");
chatRequest.Options.Temperature.Should().Be(0.1f);
chatRequest.Options.TopP.Should().Be(10.1f);
chatRequest.Options.Seed.Should().Be(11);
chatRequest.Stream.Should().BeTrue();
chatRequest.Template.Should().BeNull();

Expand Down

0 comments on commit 7567292

Please sign in to comment.