Skip to content

Commit

Permalink
Merge branch 'main' into users/markwallace/7171
Browse files Browse the repository at this point in the history
  • Loading branch information
markwallace-microsoft authored Nov 25, 2024
2 parents 9013ca5 + c5beb8a commit 77463c4
Show file tree
Hide file tree
Showing 25 changed files with 623 additions and 206 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
- name: Setup filename variables
run: echo "FILE_ID=${{ github.event.number }}" >> $GITHUB_ENV
- name: Download coverage
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
name: python-coverage-${{ env.FILE_ID }}.txt
github_token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
workflow: python-unit-tests.yml
search_artifacts: true
if_no_artifact_found: warn
- name: Download pytest
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
name: pytest-${{ env.FILE_ID }}.xml
github_token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
Expand Down
Binary file added docs/code_maps/Python.pdf
Binary file not shown.
Binary file added docs/code_maps/dotNET.pdf
Binary file not shown.
18 changes: 9 additions & 9 deletions dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="System.Numerics.Tensors" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="OllamaSharp" Version="4.0.6" />
<PackageVersion Include="OllamaSharp" Version="4.0.8" />
<!-- Tokenizers -->
<PackageVersion Include="Microsoft.ML.Tokenizers" Version="1.0.0" />
<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.24556.5" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.0-preview.9.24556.5" />
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="9.0.0-preview.9.24556.5" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.0.1-preview.1.24570.5" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.1-preview.1.24570.5" />
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="9.0.1-preview.1.24570.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 All @@ -81,8 +81,8 @@
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.10.0" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="[8.0.0, 9.0.0)" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="[8.0.0, 9.0.0)" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0" />
<!-- Test -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Moq" Version="[4.18.4]" />
Expand All @@ -102,13 +102,13 @@
<PackageVersion Include="DuckDB.NET.Data.Full" Version="1.1.2.1" />
<PackageVersion Include="DuckDB.NET.Data" Version="1.1.2.1" />
<PackageVersion Include="MongoDB.Driver" Version="2.30.0" />
<PackageVersion Include="Microsoft.Graph" Version="[4.51.0, 5)" />
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="[2.28.0, )" />
<PackageVersion Include="Microsoft.Graph" Version="4.51.0" />
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="2.28.0" />
<PackageVersion Include="Microsoft.OpenApi" Version="1.6.22" />
<PackageVersion Include="Microsoft.OpenApi.Readers" Version="1.6.22" />
<PackageVersion Include="Microsoft.OpenApi.ApiManifest" Version="0.5.6-preview" />
<PackageVersion Include="Microsoft.Plugins.Manifest" Version="1.0.0-rc2" />
<PackageVersion Include="Google.Apis.CustomSearchAPI.v1" Version="[1.60.0.3001, )" />
<PackageVersion Include="Google.Apis.CustomSearchAPI.v1" Version="1.60.0.3001" />
<PackageVersion Include="Grpc.Net.Client" Version="2.66.0" />
<PackageVersion Include="protobuf-net" Version="3.2.45" />
<PackageVersion Include="protobuf-net.Reflection" Version="3.2.12" />
Expand Down
6 changes: 6 additions & 0 deletions dotnet/samples/GettingStarted/GettingStarted.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
<ItemGroup>
<None Remove="Resources\GenerateStory.yaml" />
<None Remove="Resources\GenerateStoryHandlebars.yaml" />
<None Remove="Resources\repair-service.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\repair-service.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\GenerateStory.yaml" />
Expand Down
210 changes: 210 additions & 0 deletions dotnet/samples/GettingStarted/Resources/repair-service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
{
"openapi": "3.0.0",
"info": {
"title": "Repair Service",
"description": "A simple service to manage repairs for various items",
"version": "1.0.0"
},
"servers": [
{
"url": "https://piercerepairsapi.azurewebsites.net"
}
],
"paths": {
"/repairs": {
"get": {
"operationId": "listRepairs",
"summary": "List all repairs",
"description": "Returns a list of repairs with their details and images",
"parameters": [
{
"name": "assignedTo",
"in": "query",
"description": "Filter repairs by who they're assigned to",
"schema": {
"type": "string"
},
"required": false
}
],
"responses": {
"200": {
"description": "A successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of the repair"
},
"title": {
"type": "string",
"description": "The short summary of the repair"
},
"description": {
"type": "string",
"description": "The detailed description of the repair"
},
"assignedTo": {
"type": "string",
"description": "The user who is responsible for the repair"
},
"date": {
"type": "string",
"format": "date-time",
"description": "The date and time when the repair is scheduled or completed"
},
"image": {
"type": "string",
"format": "uri",
"description": "The URL of the image of the item to be repaired or the repair process"
}
}
}
}
}
}
}
}
},
"post": {
"operationId": "createRepair",
"summary": "Create a new repair",
"description": "Adds a new repair to the list with the given details and image URL",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The short summary of the repair"
},
"description": {
"type": "string",
"description": "The detailed description of the repair"
},
"assignedTo": {
"type": "string",
"description": "The user who is responsible for the repair"
},
"date": {
"type": "string",
"format": "date-time",
"description": "The optional date and time when the repair is scheduled or completed"
},
"image": {
"type": "string",
"format": "uri",
"description": "The URL of the image of the item to be repaired or the repair process"
}
},
"required": [
"title",
"description"
]
}
}
}
},
"responses": {
"201": {
"description": "A successful response indicating that the repair was created"
}
}
},
"patch": {
"operationId": "updateRepair",
"summary": "Update an existing repair",
"description": "Update an existing repair to the list with the new updated details and image URL",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of the repair to update"
},
"title": {
"type": "string",
"description": "The short summary of the repair"
},
"description": {
"type": "string",
"description": "The detailed description of the repair"
},
"assignedTo": {
"type": "string",
"description": "The user who is responsible for the repair"
},
"date": {
"type": "string",
"format": "date-time",
"description": "The date and time when the repair is scheduled or completed"
},
"image": {
"type": "string",
"format": "uri",
"description": "The URL of the image of the item to be repaired or the repair process"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Repair updated"
},
"404": {
"description": "Repair not found"
}
}
},
"delete": {
"operationId": "deleteRepair",
"summary": "Delete an existing repair",
"description": "Delete an existing repair from the list using its ID",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of the repair to delete"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Repair deleted"
},
"404": {
"description": "Repair not found"
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion dotnet/samples/GettingStarted/Step1_Create_Kernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed class Step1_Create_Kernel(ITestOutputHelper output) : BaseTest(out
/// Show how to create a <see cref="Kernel"/> and use it to execute prompts.
/// </summary>
[Fact]
public async Task RunAsync()
public async Task CreateKernelAsync()
{
// Create a kernel with OpenAI chat completion
Kernel kernel = Kernel.CreateBuilder()
Expand Down
2 changes: 1 addition & 1 deletion dotnet/samples/GettingStarted/Step2_Add_Plugins.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class Step2_Add_Plugins(ITestOutputHelper output) : BaseTest(outpu
/// Shows different ways to load a <see cref="KernelPlugin"/> instances.
/// </summary>
[Fact]
public async Task RunAsync()
public async Task AddPluginsAsync()
{
// Create a kernel with OpenAI chat completion
IKernelBuilder kernelBuilder = Kernel.CreateBuilder();
Expand Down
2 changes: 1 addition & 1 deletion dotnet/samples/GettingStarted/Step3_Yaml_Prompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed class Step3_Yaml_Prompt(ITestOutputHelper output) : BaseTest(outpu
/// Show how to create a prompt <see cref="KernelFunction"/> from a YAML resource.
/// </summary>
[Fact]
public async Task RunAsync()
public async Task CreatPromptFromYamlAsync()
{
// Create a kernel with OpenAI chat completion
Kernel kernel = Kernel.CreateBuilder()
Expand Down
Loading

0 comments on commit 77463c4

Please sign in to comment.