chore: import upstream snapshot with attribution
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:21:23 +08:00
commit b957a53def
5423 changed files with 863745 additions and 0 deletions
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using System.ComponentModel;
using Microsoft.SemanticKernel;
namespace SemanticKernel.AotCompatibility.Plugins;
internal sealed class WeatherPlugin
{
[KernelFunction]
[Description("Get the current weather in a given location.")]
public Weather GetCurrentWeather(Location location)
{
return location.City switch
{
"Boston" => new Weather { Temperature = 61, Condition = "rainy" },
"London" => new Weather { Temperature = 55, Condition = "cloudy" },
"Miami" => new Weather { Temperature = 80, Condition = "sunny" },
"Tokyo" => new Weather { Temperature = 50, Condition = "sunny" },
"Sydney" => new Weather { Temperature = 75, Condition = "sunny" },
_ => new Weather { Temperature = 31, Condition = "snowing" }
};
}
}