Update README.md.

This commit is contained in:
Haiping Chen 2023-06-11 10:22:48 -05:00
parent 071a64ea21
commit c03be389ca
7 changed files with 39 additions and 13 deletions

View file

@ -28,19 +28,13 @@ BotSharp is in accordance with components principle strictly, decouples every pa
* Integrate with popular message channels like Facebook Messenger, Slack and Telegram.
### Quick Started
* Make sure that you have downloaded the related components.
* See the file "BotSharp\BotSharp.WebHost\Settings\app.json",change the path to your own project's path.
You can use docker compose to run BotSharp quickly, make sure you've got `Docker`_ installed.
1. Run backend service
```sh
PS D:\> git clone https://github.com/dotnetcore/BotSharp
PS D:\> cd BotSharp
PS D:\BotSharp\> docker-compose -f dockerfiles/docker-compose-core.yml up
PS D:\BotSharp\> dotnet run -p .\src\WebStarter
```
Point your web browser at http://localhost:5500 and enjoy BotSharp Core.
2. Run UI project, reference to [Chatbot UI](src\Plugins\BotSharp.Plugin.ChatbotUI\Chatbot-UI.md).
### Extension Libraries

View file

@ -0,0 +1,11 @@
namespace BotSharp.Abstraction.Agents;
/// <summary>
/// Agent management service
/// </summary>
public interface IAgentService
{
void NewAgent();
void DeleteAgent();
void UpdateAgent();
}

View file

@ -0,0 +1,16 @@
namespace BotSharp.Abstraction.Agents.Models;
public class Agent
{
[StringLength(36)]
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public DateTime CreatedDateTime { get; set; }
public DateTime UpdatedDateTime { get; set; }
/// <summary>
/// Owner user id
/// </summary>
public string OwerId { get; set; } = string.Empty;
}

View file

@ -19,6 +19,7 @@
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>
</Project>

View file

@ -2,3 +2,4 @@ global using System;
global using System.Collections.Generic;
global using System.Text;
global using System.Threading.Tasks;
global using System.ComponentModel.DataAnnotations;

View file

@ -10,13 +10,16 @@ public static class AzureOpenAiServiceCollectionExtensions
{
public static IServiceCollection AddAzureOpenAiPlatform(this IServiceCollection services, IConfiguration config)
{
var settings = new AzureOpenAiSettings();
config.Bind("AzureAi", settings);
services.AddSingleton(x =>
{
var settings = new AzureOpenAiSettings();
config.Bind("AzureAi", settings);
return settings;
});
services.AddScoped<IChatCompletionProvider, ChatCompletionProvider>();
return services;
}
}

View file

@ -13,4 +13,4 @@ npm run dev
# Change host to BotSharp service
OPENAI_API_HOST=http://localhost:5500
```
Access `http://localhost:3000`