SK本身是支持把符合OpenAPI(这里不是OpenAI)规范的API导入成为SK的插件的,主要借助OpenApiKernelPluginFactory来完成,具体实现如下: usingMicrosoft.Extensions.DependencyInjection;usingMicrosoft.Extensions.Logging;usingMicrosoft.SemanticKernel;
在Semantic Kernel 中定义 Plugins 插件有两种方式,第一种是通过模版定义插件也叫Semantic Plugins(语义插件),第二种是通过函数创建插件也叫 Native Plugins(本地插件) Function 通过prompt创建Prompts Function vartemplate ="当前北京的天气?";varfunction=kernel.CreateFunctionFromPrompt(template); 通过Delegate来建Kern...
第一步需要安装Nuget包 NuGet\Install-Package Microsoft.SemanticKernel.Plugins.Core -Version 1.14.1-alpha 该包目前只有预览版本,如果用VS的包管理器安装,那需要勾选包括预览发行版 Semantic Kernel注册插件有两种方式: kernel.ImportPluginFromType<HttpPlugin>(); var httpclient = new HttpClient();kernel.Import...
上期我们在介绍 Semantic Function 时,就提到过 Plugin。 Plugin本质上是 Function 的容器形式,一个 Plugin 中可以包含多个 Function 。 我们可以像上期一样,单独调用一个 Function , 也可以将多个 Function 链接在一起统一调用。 将多个 Function 连接在一起就会形成 Pipeline 管道,Semantic Kernel 会使用变量自动将...
SK本身是支持把符合OpenAPI(这里不是OpenAI)规范的API导入成为SK的插件的,主要借助OpenApiKernelPluginFactory来完成,具体实现如下: usingMicrosoft.Extensions.DependencyInjection;usingMicrosoft.Extensions.Logging;usingMicrosoft.SemanticKernel;usingMicrosoft.SemanticKernel.ChatCompletion;usingMicrosoft.SemanticKernel.Connectors....
Semantic Kernel 有非常多的预定义插件,作为解决通用业务的相关能力。Plugins 地址[1] 这里面每一个类库都是一组相关功能的插件SDK,其中Plugins.Core 里面提供的使我们高频使用的插件集合。 Plugins.Core 可以看到Plugins.Core 内有以下几个插件: ConversationSummaryPlugin:对话总结插件 ...
Semantic Kernel:OpenAPI的Plugin SK的插件,能让AI功能如虎添翼。Plugin能让AI与本地功能和数据互动,使AI与应用的结合,并起到了很好的粘合剂作用。 怎么能让Plugin本身和功能分离呢?调用API是一个很好的办法,比如下面是一个查询订单的功能,是一个mini API项目。
ClientId and TenantId: this is the same as the one you copy/pasted from the App registration in previous steps \n Authority: it will be in the format: string Authority = $\"}\"; Adding Logic App as plugin in Semantic Kernel
作为SK(Semantic Kernel)核心组件之一,Plugins是一组为了实现功能而定义的函数的集合,可以达到增强LLM(大语言模型)的能力。 LLM的训练数据都是截止到过去的某一个时间,所以如果问它现在发生的事情,那么生成的内容,基本上是它在一本正经的胡说八道。LLM也不能进行调用API、发送邮件、发布文章等等操作,如果想让LLM获取...
Plugins are one of the most powerful features of Semantic Kernel and in this demowe show how you can easily use Plugins with the power of Auto Function Calling from AI Models with Javahere. A Glimpse into the Demonstration Time Information Plugin ...