这是基于vue-vben-admin 模板适用于abp vNext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
colin 409154366b feat: Adding the API key without proper verification 1 week ago
..
LINGYUN/Abp/AI/Agent feat: Adding the API key without proper verification 1 week ago
System/Collections/Generic feat: Adding the API key without proper verification 1 week ago
FodyWeavers.xml feat(ai): Add an AI integration module 2 months ago
FodyWeavers.xsd feat(ai): Add an AI integration module 2 months ago
LINGYUN.Abp.AI.Agent.csproj feat(ai): Add an AI integration module 2 months ago
README.md feat(ai): Add an AI integration module 2 months ago

README.md

LINGYUN.Abp.AI.Agent

Abp AI Module 扩展.

功能特性

模块引用

[DependsOn(typeof(AbpAIAgentModule))]
public class YouProjectModule : AbpModule
{
  // other
}

依赖模块

基本用法

兼容 IKernelAccessorIChatClientAccessor 的语法.

using LINGYUN.Abp.AI;
using LINGYUN.Abp.AI.Agent;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;
using Volo.Abp;

var application = await AbpApplicationFactory.CreateAsync<YouProjectModule>(options =>
{
    options.UseAutofac();
});

await application.InitializeAsync();

var chatClientAgentFactory = application.ServiceProvider.GetRequiredService<IChatClientAgentFactory>();

var agent = await chatClientAgentFactory.CreateAsync<YouWorkspace>();

var agentResponse = agent.RunStreamingAsync("解释一下线性代数");

await foreach (var item in agentResponse)
{
    Console.Write(item);
}
Console.WriteLine();

await application.ShutdownAsync();

Console.WriteLine();
Console.WriteLine("AI Console completed!");

Console.ReadKey();

支持动态工作区语法.

using LINGYUN.Abp.AI;
using LINGYUN.Abp.AI.Agent;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;
using Volo.Abp;

var application = await AbpApplicationFactory.CreateAsync<YouProjectModule>(options =>
{
    options.UseAutofac();
});

await application.InitializeAsync();

var chatClientAgentFactory = application.ServiceProvider.GetRequiredService<IChatClientAgentFactory>();

var agent = await chatClientAgentFactory.CreateAsync("YouWorkspace");

var agentResponse = agent.RunStreamingAsync("解释一下线性代数");

await foreach (var item in agentResponse)
{
    Console.Write(item);
}
Console.WriteLine();

await application.ShutdownAsync();

Console.WriteLine();
Console.WriteLine("AI Console completed!");

Console.ReadKey();