feat: 将插件 stdin 协议定为 v1,并按声明注入凭据
进程外插件改为只读环境变量和自身配置,避免读宿主 appsettings;宿主按 plugin.json 声明注入 LLM / OpenWeather 等凭据。
This commit is contained in:
@@ -26,7 +26,7 @@ public sealed class WeatherTools(WeatherOptions options, HttpClient http)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(options.OpenWeather.ApiKey))
|
||||
{
|
||||
return "OpenWeather 已启用,但 appsettings.json 里 Weather:OpenWeather:ApiKey 为空。请填入密钥,或把 Provider 改回 Wttr。";
|
||||
return "OpenWeather 已启用,但 API Key 为空。请配置 OPENWEATHER_API_KEY(插件凭据或环境变量),或把 Provider 改回 Wttr。";
|
||||
}
|
||||
|
||||
return await QueryOpenWeatherAsync(location);
|
||||
|
||||
Reference in New Issue
Block a user