forked from MicrosoftDocs/semantic-kernel-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request MicrosoftDocs#190 from MicrosoftDocs/repo_sync_wor…
…king_branch Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/semantic-kernel-docs (branch main)
- Loading branch information
Showing
32 changed files
with
304 additions
and
142 deletions.
There are no files selected for viewing
11 changes: 1 addition & 10 deletions
11
samples/dotnet/14-Create-ChatGPT-Plugin/MathPlugin/azure-function/AIPluginJson.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/dotnet/14-Create-ChatGPT-Plugin/MathPlugin/azure-function/Extensions/IAIPluginRunner.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
samples/dotnet/14-Create-ChatGPT-Plugin/MathPlugin/azure-function/Logo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Net; | ||
using Microsoft.Azure.Functions.Worker; | ||
using Microsoft.Azure.Functions.Worker.Http; | ||
|
||
public class Logo | ||
{ | ||
[Function("GetLogo")] | ||
public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "logo.png")] HttpRequestData req) | ||
{ | ||
// Return logo.png that's in the root of the project | ||
var response = req.CreateResponse(HttpStatusCode.OK); | ||
response.Headers.Add("Content-Type", "image/png"); | ||
|
||
var logo = System.IO.File.ReadAllBytes("logo.png"); | ||
response.Body.Write(logo); | ||
|
||
return response; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
samples/dotnet/14-Create-ChatGPT-Plugin/MathPlugin/azure-function/Models/KernelSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 44 additions & 6 deletions
50
samples/dotnet/14-Create-ChatGPT-Plugin/MathPlugin/azure-function/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...te-ChatGPT-Plugin/MathPlugin/azure-function/config-samples/appsettings.json.azure-example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...e-ChatGPT-Plugin/MathPlugin/azure-function/config-samples/appsettings.json.openai-example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
samples/dotnet/14-Create-ChatGPT-Plugin/MathPlugin/azure-function/shared/PluginApi.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
namespace skchatgptazurefunction.PluginShared; | ||
|
||
/// <summary> | ||
/// This class represents the plugin API specification. | ||
/// </summary> | ||
public class PluginApi | ||
{ | ||
/// <summary> | ||
/// The API specification | ||
/// </summary> | ||
public string Type { get; set; } = "openapi"; | ||
|
||
/// <summary> | ||
/// URL used to fetch the specification | ||
/// </summary> | ||
public string Url { get; set; } = string.Empty; | ||
} |
40 changes: 40 additions & 0 deletions
40
samples/dotnet/14-Create-ChatGPT-Plugin/MathPlugin/azure-function/shared/PluginAuth.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace skchatgptazurefunction.PluginShared; | ||
|
||
/// <summary> | ||
/// This class represents the OpenAI plugin authentication schema. | ||
/// </summary> | ||
public class PluginAuth | ||
{ | ||
/// <summary> | ||
/// Tokens for API key authentication | ||
/// </summary> | ||
public class VerificationTokens | ||
{ | ||
/// <summary> | ||
/// The API key | ||
/// </summary> | ||
public string OpenAI { get; set; } = string.Empty; | ||
} | ||
|
||
/// <summary> | ||
/// The authentication schema | ||
/// Supported values: none, service_http, user_http | ||
/// </summary> | ||
public string Type { get; set; } = "none"; | ||
|
||
/// <summary> | ||
/// Manifest schema version | ||
/// </summary> | ||
[JsonPropertyName("authorization_type")] | ||
public string AuthorizationType { get; } = "bearer"; | ||
|
||
/// <summary> | ||
/// Tokens for API key authentication | ||
/// </summary> | ||
[JsonPropertyName("verification_tokens")] | ||
public VerificationTokens Tokens { get; set; } = new VerificationTokens(); | ||
} |
Oops, something went wrong.