Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C#] bump: dotnet to v1.6.0 #2083

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Azure.AI.OpenAI" Version="2.0.0-beta.5" />
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.9" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="OpenAI" Version="2.0.0-beta.11" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Nullable>enable</Nullable>
<PackageId>Microsoft.Teams.AI</PackageId>
<Product>Microsoft Teams AI SDK</Product>
<Version>1.5.0</Version>
<Version>1.6.0</Version>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
Expand Down Expand Up @@ -40,9 +40,9 @@
<PackageReference Include="Azure.AI.OpenAI" Version="2.0.0-beta.5" />
<PackageReference Include="JsonSchema.Net" Version="5.5.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.9" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.9" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.ML.Tokenizers" Version="0.22.0-preview.24271.1" />
Expand Down
4 changes: 2 additions & 2 deletions dotnet/samples/01.messaging.echoBot/EchoBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards.Templating" Version="1.3.1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Exclude Teams Toolkit files from build output, but can still be viewed from Solution Explorer -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards.Templating" Version="1.4.0" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Exclude Teams Toolkit files from build output, but can still be viewed from Solution Explorer -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.9" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Exclude Teams Toolkit files from build output, but can still be viewed from Solution Explorer -->
Expand Down
8 changes: 4 additions & 4 deletions dotnet/samples/04.ai.a.teamsChefBot/TeamsChefBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Connector" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.9" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Bot.Connector" Version="4.22.9" />
<PackageReference Include="Microsoft.KernelMemory.AI.OpenAI" Version="0.73.240906.1" />
<PackageReference Include="Microsoft.KernelMemory.Core" Version="0.73.240906.1" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Exclude Teams Toolkit files from build output, but can still be viewed from Solution Explorer -->
Expand Down
4 changes: 2 additions & 2 deletions dotnet/samples/04.ai.b.messageExtensions.gptME/GPT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<ItemGroup>
<PackageReference Include="AdaptiveCards" Version="3.1.0" />
<PackageReference Include="AdaptiveCards.Templating" Version="1.4.0" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Include prompt as content in build output -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards.Templating" Version="1.3.1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Include prompt as content in build output -->
Expand All @@ -28,21 +28,16 @@
<Content Remove="appPackage/**/*" />
<None Include="appPackage/**/*" />
<None Include="env/**/*" />
<Content Remove="infra/**/*" />
<None Include="infra/**/*" />
</ItemGroup>

<!-- Exclude local settings from publish -->
<ItemGroup>
<Content Remove="appsettings.Development.json" />
<None Remove="prompts\monologue\skprompt.txt" />
<Content Include="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>None</CopyToPublishDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Prompts\Monologue\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards.Templating" Version="1.4.0" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Include prompt as content in build output -->
<ItemGroup>
<Folder Include="Prompts/Sequence/" />
<Content Include="Prompts/*/skprompt.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
Expand All @@ -31,9 +30,15 @@
<Content Remove="appPackage/**/*" />
<None Include="appPackage/**/*" />
<None Include="env/**/*" />
<Compile Remove="Prompts\Sequence\**" />
<Content Remove="infra/**/*" />
<Content Remove="Prompts\Sequence\**" />
<None Include="infra/**/*" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="Prompts\Sequence\**" />
<None Remove="Prompts\Sequence\**" />
</ItemGroup>

<!-- Exclude local settings from publish -->
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ deploy:
with:
artifactFolder: bin/Release/net6.0/win-x86/publish
resourceId: ${{BOT_AZURE_APP_SERVICE_RESOURCE_ID}}
projectId: 426d5b8a-9a82-40b6-b6a8-7c594361559d
4 changes: 2 additions & 2 deletions dotnet/samples/04.ai.f.vision.cardMaster/CardGazer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards.Templating" Version="1.3.1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace CardGazer
{
public class CardGazerBotActions
{
[Action("SendCard")]
public async Task<string> SendCard([ActionTurnContext] ITurnContext turnContext, [ActionTurnState] AppState turnState, [ActionParameters] Dictionary<string, object> args)
[Action("SendAdaptiveCard")]
public async Task<string> SendAdaptiveCard([ActionTurnContext] ITurnContext turnContext, [ActionTurnState] AppState turnState, [ActionParameters] Dictionary<string, object> args)
{

if (args.TryGetValue("card", out object? cardObject) && cardObject is JsonElement cardJson)
Expand All @@ -36,7 +36,7 @@ public async Task<string> SendCard([ActionTurnContext] ITurnContext turnContext,
return "failed to parsed card from action arguments";
}

[Action("ShowCardJSON")]
[Action("DisplayJSON")]
public async Task<string> ShowCardJSON([ActionTurnContext] ITurnContext turnContext, [ActionTurnState] AppState turnState, [ActionParameters] Dictionary<string, object> args)
{
if (args.TryGetValue("card", out object? cardObject) && cardObject is JsonElement cardJson)
Expand Down
2 changes: 1 addition & 1 deletion dotnet/samples/04.ai.f.vision.cardMaster/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
prompts: prompts,
defaultPrompt: async (context, state, planner) =>
{
PromptTemplate template = prompts.GetPrompt("sequence");
PromptTemplate template = prompts.GetPrompt("tools");
return await Task.FromResult(template);
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
[
{
"name": "SendCard",
"name": "SendAdaptiveCard",
"description": "Sends an adaptive card to the user",
"parameters": {
"type": "object",
"properties": {
"card": {
"$ref": "https://adaptivecards.io/schemas/adaptive-card.json#",
"type": "object",
"description": "The adaptive card to send"
}
},
"required": [
"card"
]
"required": [ "card" ]
}
},
{
"name": "ShowCardJSON",
"name": "DisplayJSON",
"description": "Shows the user the JSON for an adaptive card",
"parameters": {
"type": "object",
"properties": {
"card": {
"$ref": "https://adaptivecards.io/schemas/adaptive-card.json#",
"type": "object",
"description": "The adaptive card JSON to show"
"description": "The adaptive card JSON as raw text"
}
},
"required": [
"card"
]
"required": [ "card" ]
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Vision Bot",
"type": "completion",
"completion": {
"model": "gpt-4-vision-preview",
"model": "gpt-4o",
"completion_type": "chat",
"include_history": true,
"include_input": true,
Expand All @@ -17,6 +17,6 @@
"stop_sequences": []
},
"augmentation": {
"augmentation_type": "sequence"
"augmentation_type": "tools"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
You are a friendly assistant for Microsoft Teams with vision support.
You are an expert on converting doodles and images to Adaptive Cards for Microsoft Teams.
When shown an image try to convert it to an Adaptive Card and send it using SendCard.
For Adaptive Cards with Image placeholders use ShowCardJSON instead..
When shown an image try to convert it to an Adaptive Card and send it using SendAdaptiveCard.
When the user asks for JSON, use DisplayJSON to show the JSON of the Adaptive Card.
4 changes: 2 additions & 2 deletions dotnet/samples/04.e.twentyQuestions/TwentyQuestions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Include prompt as content in build output -->
Expand Down
8 changes: 4 additions & 4 deletions dotnet/samples/06.assistants.a.mathBot/MathBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Azure.AI.OpenAI.Assistants" Version="1.0.0-beta.3" />
<PackageReference Include="OpenAI" Version="2.0.0-beta.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
<PackageReference Include="Azure.AI.OpenAI.Assistants" Version="1.0.0-beta.4" />
<PackageReference Include="OpenAI" Version="2.0.0-beta.11" />
</ItemGroup>

<!-- Exclude Teams Toolkit files from build output, but can still be viewed from Solution Explorer -->
Expand Down
4 changes: 4 additions & 0 deletions dotnet/samples/06.assistants.a.mathBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
using Azure.Identity;
using System.Runtime.CompilerServices;

#pragma warning disable OPENAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllers();
Expand Down Expand Up @@ -149,3 +151,5 @@
app.MapControllers();

app.Run();

#pragma warning restore OPENAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
10 changes: 5 additions & 5 deletions dotnet/samples/06.assistants.b.orderBot/OrderBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI.Assistants" Version="1.0.0-beta.3" />
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="OpenAI" Version="2.0.0-beta.7" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.0.0-beta.2" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Azure.AI.OpenAI.Assistants" Version="1.0.0-beta.4" />
<PackageReference Include="OpenAI" Version="2.0.0-beta.11" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.0.0-beta.5" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Exclude Teams Toolkit files from build output, but can still be viewed from Solution Explorer -->
Expand Down
8 changes: 6 additions & 2 deletions dotnet/samples/06.assistants.b.orderBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
}
catch (Exception e)
{
throw new Exception("Failed to upload file to vector store.", e.InnerException);
throw new Exception("Failed to upload file to vector store.", e);
}


Expand All @@ -133,7 +133,11 @@
}
};

assistantCreationOptions.Tools.Add(new FunctionToolDefinition("place_order", "Creates or updates a food order.", new BinaryData(OrderParameters.GetSchema())));
assistantCreationOptions.Tools.Add(new FunctionToolDefinition() {
FunctionName = "place_order",
Description = "Creates or updates a food order.",
Parameters = new BinaryData(OrderParameters.GetSchema())
});
assistantCreationOptions.Tools.Add(new FileSearchToolDefinition());

string newAssistantId = "";
Expand Down
4 changes: 2 additions & 2 deletions dotnet/samples/06.auth.oauth.bot/BotAuth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards.Templating" Version="1.3.1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Identity.Web.TokenCache" Version="2.16.0" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Exclude Teams Toolkit files from build output, but can still be viewed from Solution Explorer -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards.Templating" Version="1.4.0" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
<PackageReference Include="Microsoft.Graph" Version="4.54.0" />
<PackageReference Include="Microsoft.Identity.Web.TokenCache" Version="2.16.0" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.6.*" />
</ItemGroup>

<!-- Exclude Teams Toolkit files from build output, but can still be viewed from Solution Explorer -->
Expand Down
Loading
Loading