前天尝试通过 one-api + dashscope(阿里云灵积) + qwen(通义千问)运行 Semantic Kernel 插件(Plugin) ,结果尝试失败,详见前天的博文。 今天换一种方式尝试,选择了一个旁门左道走走看,看能不能在不使用大模型的情况下让 Semantic Kernel 插件运行起来,这个旁门左道就是从 Stephen Toub 那偷学到的一招 —— 借助 DelegatingHandler(new HttpClientHandler()) 拦截 HttpClient 请求,直接以模拟数据进行响应。 先创建一个 .NET 控制台项目 dotnet new console dotnet add package Microsoft.SemanticKernel dotnet add package Microsoft.Extensions.Http 参照 Semantic Kernel 源码中的示例代码创建一个非常简单的插件 LightPlugin public class LightPlugin { public bool IsOn { get; set;...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile