Skip to content

Commit

Permalink
.Net: Update to Azure.AI.OpenAI version 1.0.0-beta.6 (#2090)
Browse files Browse the repository at this point in the history
### Motivation and Context
Utilize the latest version of the Azure.AI.OpenAI package. This provides
support for the latest Azure OpenAI REST API versions (including
function calling!) and fixes a minor regression.

Fixes #2089 

### Description

Update to Azure.AI.OpenAI version 1.0.0-beta.6 and fix minor regression.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https:/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https:/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Shawn Callegari <[email protected]>
  • Loading branch information
anthonypuppo and shawncal authored Jul 20, 2023
1 parent 9dd8604 commit dbb7cb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.5" />
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.6" />
<PackageVersion Include="Azure.Identity" Version="1.9.0" />
<PackageVersion Include="Azure.Search.Documents" Version="11.5.0-beta.3" />
<PackageVersion Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ private static ChatCompletionsOptions CreateChatCompletionsOptions(ChatRequestSe
NucleusSamplingFactor = (float?)requestSettings.TopP,
FrequencyPenalty = (float?)requestSettings.FrequencyPenalty,
PresencePenalty = (float?)requestSettings.PresencePenalty,
ChoicesPerPrompt = requestSettings.ResultsPerPrompt
ChoiceCount = requestSettings.ResultsPerPrompt
};

foreach (var keyValue in requestSettings.TokenSelectionBiases)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ namespace Microsoft.SemanticKernel.AI.ChatCompletion;
/// <summary>
/// The role that instructs or sets the behavior of the assistant.
/// </summary>
public static readonly AuthorRole System = new("System");
public static readonly AuthorRole System = new("system");
/// <summary>
/// The role that provides responses to system-instructed, user-prompted input.
/// </summary>
public static readonly AuthorRole Assistant = new("Assistant");
public static readonly AuthorRole Assistant = new("assistant");
/// <summary>
/// The role that provides input for chat completions.
/// </summary>
public static readonly AuthorRole User = new("User");
public static readonly AuthorRole User = new("user");

/// <summary>
/// Gets the label associated with this AuthorRole.
Expand Down

0 comments on commit dbb7cb9

Please sign in to comment.