整体逻辑 ASP.NET Core gRPC 的使用很简单,服务注册和中间件只有两行代码。 var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddGrpc(); var app = builder.Build(); // Configure the HTTP request pipeline. app.MapGrpcService<Gr[......]继续阅…

2024年4月3日 0条评论 5014点热度 2人点赞 痴者工良 阅读全文

AI is becoming increasingly popular, so I am writing a simple introductory tutorial for readers in the hope that they will enjoy it. Many people want to learn AI but don't know how to get started. I was the same way at the beginning; first, I learned Python, t…

2024年3月25日 0条评论 2522点热度 1人点赞 痴者工良 阅读全文

AI is becoming increasingly popular, so I am writing a simple introductory tutorial for readers in the hope that they will enjoy it. Many people want to learn AI but don't know how to get started. I was the same way at the beginning; first, I learned Python, t…

2024年3月25日 0条评论 12093点热度 1人点赞 痴者工良 阅读全文

Why Write This Tutorial After graduation, readers have written a large number of articles and open-source projects. It is through the persistence of learning while outputting that the author has ultimately evolved from a newbie to an experienced developer. In …

2024年3月21日 2条评论 1305点热度 8人点赞 痴者工良 阅读全文

为什么要写这个教程 在毕业之后,读者写过了大量的文章和开源项目,正是坚持一边学习一边输出,所以笔者最终从一个生菜鸡进化为一个熟菜鸡。 在程序员的成长中,我们会在思路,如何学习、如何进步,比如要成长为一个架构师,需要具备什么样的能力。比如说技术能力,技术能力是最核心的基础,那么我们技术上要达到哪种程度?可以手撸框架?脚踢汇编、拳打微服务架构? 常常会有技术社区朋友和读者进行交流,很多读者不知道怎么学习。笔者也是,我也不知道怎么学,各类东西都在学、都在搞,还没有确定要专门做什么,比如最近在学 AI。年轻人,总是很迷茫,…

2024年3月21日 2条评论 9034点热度 8人点赞 痴者工良 阅读全文

Initialization When KernelMemory starts, it checks the configuration, even if the current code does not utilize the relevant features. var hasQueueFactory = (this._memoryServiceCollection.HasService<QueueClientFactory>()); var hasContentStorage = (this._…

2024年3月13日 0条评论 2072点热度 3人点赞 痴者工良 阅读全文

初始化 KernelMemory 启动时,会检查配置,即使当前代码没有使用到相关功能。 var hasQueueFactory = (this._memoryServiceCollection.HasService<QueueClientFactory>()); var hasContentStorage = (this._memoryServiceCollection.HasService<IContentStorage>()); var hasMimeDetector = (this._…

2024年3月13日 0条评论 7139点热度 4人点赞 痴者工良 阅读全文

Long Literary Works and AI Model Integration: Semantic Kernel and Kernel Memory, a Super Simple Tutorial by whuanle Table of Contents: Environment Setup Deploying one-api Configuring Project Environment Model Classification and Application Scenarios Chatting P…

2024年2月29日 0条评论 1575点热度 1人点赞 痴者工良 阅读全文

万字长文学会对接 AI 模型:Semantic Kernel 和 Kernel Memory,工良出品,超简单的教程 目录: 配置环境 部署 one-api 配置项目环境 模型划分和应用场景 聊天 提示词 引导 AI 回复 指定 AI 回复特定格式 模板化提示 聊天记录 函数和插件 直接调用插件函数 提示模板文件 根据 AI 自动调用插件函数 聊天中明确调用函数 实现总结 配置提示词 提示模板语法 变量 函数调用 文本生成 Semantic Kernel 插件 文档插件 planners Kernel Memory…

2024年2月29日 0条评论 8270点热度 1人点赞 痴者工良 阅读全文

Adding Parameters in Conversation Use CreateFunctionFromPrompt() to create a KernelFunction instance specified by the prompt template. A KernelFunction represents a function that can be called as part of a semantic kernel workload. The call to the LLM in the S…

2024年2月24日 0条评论 1328点热度 1人点赞 痴者工良 阅读全文

在对话中添加参数 使用 CreateFunctionFromPrompt() 为通过提示模板指定的提示创建 KernelFunction 实例。 KernelFunction 表示可以作为语义内核工作负载的一部分调用的函数。Semantic Kernel 中对 LLM 的调用就叫 KernelFunction。KernelFunction 分为 Semantic Function 、Native Function(本地函数)两种。 private readonly IKernelBuilder _kernelBui…

2024年2月24日 0条评论 5489点热度 1人点赞 痴者工良 阅读全文

EF Core does not insert data directly into the database during insertion operations; instead, it first caches the data in memory. Data will only be inserted into the database under the following conditions: Explicitly calling the SaveChanges() method The conte…

2024年2月19日 0条评论 1182点热度 1人点赞 痴者工良 阅读全文

EF Core 在执行插入操作时,不会直接将数据插入数据库,而是先将数据缓存在内存中。只有在以下情况下,EF Core才会将数据插入数据库: 显式调用 SaveChanges() 方法 上下文对象被销毁 达到上下文配置的批量插入数量 EF Core 将数据缓存在内存中的好处包括: 提高性能,批量插入数据可以提高数据库的性能。 减少错误,在将数据插入数据库之前,EF Core 可以对数据进行验证,以确保数据的有效性。 EF Core 将数据缓存在内存中的缺点包括: 增加内存使用量:如果缓存的数据量过大,可能会导致内存…

2024年2月19日 0条评论 4970点热度 1人点赞 痴者工良 阅读全文

The interface control is composed of a Grid and several controls, using an Expander to allow panel content to be expanded. <Grid> <Grid MinWidth="100" Height="50" VerticalAlignment="Top" HorizontalAlignment="Left…

2024年2月6日 0条评论 1182点热度 3人点赞 痴者工良 阅读全文

编写界面控件,元素由 Grid 和一些控件组成,其中使用了 Expander 以便可以扩展面板内容。 <Grid> <Grid MinWidth="100" Height="50" VerticalAlignment="Top" HorizontalAlignment="Left" Background="Transparent" Margin="0,0,0,0" PreviewMouseDown="Button_MouseDown"[......]继续阅读

2024年2月6日 0条评论 4994点热度 3人点赞 痴者工良 阅读全文

随着 AI 的广泛影响,越来越多的企业在考虑是否可以接入 AI ,结合内部业务需求,实现一些落地场景。目前市面上有着很多的 AI 应用和形形色色、各种各样的开源 AI 系统,对于不了解 AI 的技术、非技术人员来说,怎么去学习了解、搭建 demo 是很困难的。因此,本文旨在以简单的方式帮助读者快速搭建两个 AI 系统,读者可以在使用两个系统后,更加深入了解 WebUI、大模型等相关的概念,以及可以知道目前的大语言模型可以做什么,怎么进行二次开发。 one-api one-api 是用于集合各种模型,然后统一转换为 …

2024年2月1日 0条评论 5736点热度 0人点赞 痴者工良 阅读全文

随着 AI 的广泛影响,越来越多的企业在考虑是否可以接入 AI ,结合内部业务需求,实现一些落地场景。目前市面上有着很多的 AI 应用和形形色色、各种各样的开源 AI 系统,对于不了解 AI 的技术、非技术人员来说,怎么去学习了解、搭建 demo 是很困难的。因此,本文旨在以简单的方式帮助读者快速搭建两个 AI 系统,读者可以在使用两个系统后,更加深入了解 WebUI、大模型等相关的概念,以及可以知道目前的大语言模型可以做什么,怎么进行二次开发。 one-api one-api 是用于集合各种模型,然后统一转换为 …

2024年2月1日 0条评论 6887点热度 0人点赞 痴者工良 阅读全文

踩了不少坑,因为网上的资料实在太陈旧了。。。 安装 vue 后,首先检查 package.json 中的命令,是否为 vite。 然后根据需求,定义多个环境及其名称。 "dev": "vite", "build":"vite build", "build:test": "vite build --mode test", "build:uat": "vite build…

2024年1月3日 4条评论 2140点热度 6人点赞 痴者工良 阅读全文

踩了不少坑,因为网上的资料实在太陈旧了。。。 安装 vue 后,首先检查 package.json 中的命令,是否为 vite。 然后根据需求,定义多个环境及其名称。 "dev": "vite", "build":"vite build", "build:test": "vite build --mode test", "build:uat": "vite build --mode uat", "build:pro": "vite build --mode pro", 默认什么都不加,即 npm run build…

2024年1月3日 4条评论 9043点热度 6人点赞 痴者工良 阅读全文

当 PDF 包含 STSONG-light 字体时,会导致转换 PDF 为图片时文字丢失。这是由于 Ghostscript 的默认配置问题,通常在 Docker 中会遇到这个问题。 查看 Ghostscript 配置文件: cat /etc/ghostscript/cidfmap.d/90gs-cjk-resource-gb1.conf 部分内容如下: /Song-Medium /GBZenKai-Medium ; /STSong-Light /BousungEG-Light-GB ; /STFangsong-Li…

2023年12月25日 0条评论 4683点热度 0人点赞 痴者工良 阅读全文
1234554