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

Roll back default language version from 11 to 10 #799

Merged
merged 6 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dotnet/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AnalysisLevel>latest</AnalysisLevel>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>11</LangVersion>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion dotnet/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AnalysisLevel>latest</AnalysisLevel>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>11</LangVersion>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
Expand Down
46 changes: 23 additions & 23 deletions dotnet/src/Extensions/Planning.ActionPlanner/ActionPlanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,33 +166,33 @@ public string ListOfFunctions(string goal, SKContext context)
[SKFunctionInput(Description = "The current goal processed by the planner", DefaultValue = "")]
public string GoodExamples(string goal, SKContext context)
{
return """
return @"
[EXAMPLE]
- List of functions:
// Read a file.
FileIOSkill.ReadAsync
Parameter "path": Source file.
Parameter ""path"": Source file.
// Write a file.
FileIOSkill.WriteAsync
Parameter "path": Destination file.
Parameter "content": File content.
Parameter ""path"": Destination file.
Parameter ""content"": File content.
// Get the current time.
TimeSkill.Time
No parameters.
// Makes a POST request to a uri.
HttpSkill.PostAsync
Parameter "body": The body of the request.
Parameter ""body"": The body of the request.
- End list of functions.
Goal: create a file called "something.txt".
{"plan":{
"rationale": "the list contains a function that allows to create files",
"function": "FileIOSkill.WriteAsync",
"parameters": {
"path": "something.txt",
"content": null
Goal: create a file called ""something.txt"".
{""plan"":{
""rationale"": ""the list contains a function that allows to create files"",
""function"": ""FileIOSkill.WriteAsync"",
""parameters"": {
""path"": ""something.txt"",
""content"": null
}}}
#END-OF-PLAN
""";
";
}

// TODO: generate string programmatically
Expand All @@ -201,31 +201,31 @@ No parameters.
[SKFunctionInput(Description = "The current goal processed by the planner", DefaultValue = "")]
public string EdgeCaseExamples(string goal, SKContext context)
{
return """
return @"
[EXAMPLE]
- List of functions:
// Get the current time.
TimeSkill.Time
No parameters.
// Write a file.
FileIOSkill.WriteAsync
Parameter "path": Destination file.
Parameter "content": File content.
Parameter ""path"": Destination file.
Parameter ""content"": File content.
// Makes a POST request to a uri.
HttpSkill.PostAsync
Parameter "body": The body of the request.
Parameter ""body"": The body of the request.
// Read a file.
FileIOSkill.ReadAsync
Parameter "path": Source file.
Parameter ""path"": Source file.
- End list of functions.
Goal: tell me a joke.
{"plan":{
"rationale": "the list does not contain functions to tell jokes or something funny",
"function": "",
"parameters": {
{""plan"":{
""rationale"": ""the list does not contain functions to tell jokes or something funny"",
""function"": """",
""parameters"": {
}}}
#END-OF-PLAN
""";
";
}

private void PopulateList(StringBuilder list, IDictionary<string, List<FunctionView>> functions)
Expand Down
1 change: 0 additions & 1 deletion samples/dotnet/KernelHttpServer/KernelHttpServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ private static async Task RunChatGptPluginAsync()
{
var kernel = new KernelBuilder().WithLogger(ConsoleLogger.Log).Build();
using HttpClient importHttpClient = new HttpClient();
importHttpClient.DefaultRequestHeaders.Add("User-Agent", "Microsoft.SemanticKernel");
importHttpClient.DefaultRequestHeaders.Add("User-Agent", "Microsoft-Semantic-Kernel");
adrianwyatt marked this conversation as resolved.
Show resolved Hide resolved

//Import a ChatGPT plugin using one of the following Kernel extension methods
//kernel.ImportChatGptPluginSkillFromResourceAsync
Expand Down