Skip to content

Commit 6224a04

Browse files
committed
dotnet run --project .\src\WebStarter
1 parent 8c69c6f commit 6224a04

File tree

12 files changed

+59
-32
lines changed

12 files changed

+59
-32
lines changed

BotSharp.sln

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.TelegramBot
7777
EndProject
7878
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Logger", "src\Infrastructure\BotSharp.Logger\BotSharp.Logger.csproj", "{5CA3335E-E6AD-46FD-B277-29BBC3A16500}"
7979
EndProject
80-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.HttpHandler", "src\Plugins\BotSharp.Plugin.HttpHandler\BotSharp.Plugin.HttpHandler.csproj", "{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}"
80+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.HttpHandler", "src\Plugins\BotSharp.Plugin.HttpHandler\BotSharp.Plugin.HttpHandler.csproj", "{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}"
81+
EndProject
82+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.SqlDriver", "src\Plugins\BotSharp.Plugin.SqlDriver\BotSharp.Plugin.SqlDriver.csproj", "{D775DB67-A4B4-44E5-9144-522689590057}"
8183
EndProject
8284
Global
8385
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -303,6 +305,14 @@ Global
303305
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|Any CPU.Build.0 = Release|Any CPU
304306
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|x64.ActiveCfg = Release|Any CPU
305307
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75}.Release|x64.Build.0 = Release|Any CPU
308+
{D775DB67-A4B4-44E5-9144-522689590057}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
309+
{D775DB67-A4B4-44E5-9144-522689590057}.Debug|Any CPU.Build.0 = Debug|Any CPU
310+
{D775DB67-A4B4-44E5-9144-522689590057}.Debug|x64.ActiveCfg = Debug|Any CPU
311+
{D775DB67-A4B4-44E5-9144-522689590057}.Debug|x64.Build.0 = Debug|Any CPU
312+
{D775DB67-A4B4-44E5-9144-522689590057}.Release|Any CPU.ActiveCfg = Release|Any CPU
313+
{D775DB67-A4B4-44E5-9144-522689590057}.Release|Any CPU.Build.0 = Release|Any CPU
314+
{D775DB67-A4B4-44E5-9144-522689590057}.Release|x64.ActiveCfg = Release|Any CPU
315+
{D775DB67-A4B4-44E5-9144-522689590057}.Release|x64.Build.0 = Release|Any CPU
306316
EndGlobalSection
307317
GlobalSection(SolutionProperties) = preSolution
308318
HideSolutionNode = FALSE
@@ -342,6 +352,7 @@ Global
342352
{DCA18996-4D3A-4E98-BCD0-1FB77C59253E} = {64264688-0F5C-4AB0-8F2B-B59B717CCE00}
343353
{5CA3335E-E6AD-46FD-B277-29BBC3A16500} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
344354
{32D9E720-6FE6-4F29-94B1-B10B05BFAD75} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
355+
{D775DB67-A4B4-44E5-9144-522689590057} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
345356
EndGlobalSection
346357
GlobalSection(ExtensibilityGlobals) = postSolution
347358
SolutionGuid = {A9969D89-C98B-40A5-A12B-FC87E55B3A19}

docs/quick-start/get-started.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ In order to allow developers to experience the convenience of BotSharp as quickl
66

77
### Run in command line
88

9-
```console
9+
```shell
1010
git clone https://github.com/SciSharp/BotSharp
1111
cd BotSharp
12+
# Run PizzzaBot showcase with package reference
1213
dotnet run --project .\src\WebStarter\WebStarter.csproj -p SolutionName=PizzaBot
14+
15+
# Use BotSharp to include all dependent projects with latest source code
16+
dotnet run --project .\src\WebStarter
1317
```
1418

1519
Here you go, you will see this running screen.
@@ -27,7 +31,7 @@ BotSharp has an official front-end project to be used in conjunction with the ba
2731
```console
2832
git clone https://github.com/SciSharp/BotSharp-UI
2933
cd BotSharp-UI
30-
npm install --force
34+
npm install
3135
npm run dev
3236
```
3337

src/Infrastructure/BotSharp.Logger/BotSharp.Logger.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>netstandard2.1</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<LangVersion>$(LangVersion)</LangVersion>

src/Plugins/BotSharp.Plugin.SqlDriver/Actions/ExecuteQueryAction.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
using BotSharp.Abstraction.Conversations.Models;
22
using BotSharp.Abstraction.Functions;
3-
using BotSharp.Plugin.SqlHero.Models;
3+
using BotSharp.Plugin.SqlDriver.Models;
44
using BotSharp.Plugin.SqlHero.Settings;
55
using Dapper;
66
using MySqlConnector;
77
using System.Text.Json;
88
using System.Threading.Tasks;
99

10-
namespace BotSharp.Plugin.SqlHero.Actions;
10+
namespace BotSharp.Plugin.SqlDriver.Actions;
1111

1212
public class ExecuteQueryAction : IFunctionCallback
1313
{
1414
public string Name => "execute_sql";
1515

16-
private readonly SqlHeroSetting _setting;
16+
private readonly SqlDriverSetting _setting;
1717

18-
public ExecuteQueryAction(SqlHeroSetting setting)
18+
public ExecuteQueryAction(SqlDriverSetting setting)
1919
{
2020
_setting = setting;
2121
}

src/Plugins/BotSharp.Plugin.SqlDriver/BotSharp.Plugin.SqlHero.csproj renamed to src/Plugins/BotSharp.Plugin.SqlDriver/BotSharp.Plugin.SqlDriver.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<Nullable>enable</Nullable>
6-
<RootNamespace>$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
6+
<LangVersion>$(LangVersion)</LangVersion>
7+
<VersionPrefix>$(BotSharpVersion)</VersionPrefix>
8+
<GeneratePackageOnBuild>$(GeneratePackageOnBuild)</GeneratePackageOnBuild>
9+
<GenerateDocumentationFile>$(GenerateDocumentationFile)</GenerateDocumentationFile>
710
</PropertyGroup>
811

912
<ItemGroup>

src/Plugins/BotSharp.Plugin.SqlDriver/Models/LlmInputArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Text.Json.Serialization;
22

3-
namespace BotSharp.Plugin.SqlHero.Models;
3+
namespace BotSharp.Plugin.SqlDriver.Models;
44

55
public class LlmInputArgs
66
{
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace BotSharp.Plugin.SqlHero.Settings;
22

3-
public class SqlHeroSetting
3+
public class SqlDriverSetting
44
{
55
public string MySqlConnectionString { get; set; }
66
}

src/Plugins/BotSharp.Plugin.SqlDriver/SqlHeroPlugin.cs renamed to src/Plugins/BotSharp.Plugin.SqlDriver/SqlDriverPlugin.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@
66
using System.Drawing;
77
using System.Text.RegularExpressions;
88

9-
namespace BotSharp.Plugin.SqlHero;
9+
namespace BotSharp.Plugin.SqlDriver;
1010

11-
public class SqlHeroPlugin : IBotSharpPlugin
11+
public class SqlDriverPlugin : IBotSharpPlugin
1212
{
13-
public string Name => "SQL Hero";
13+
public string Id => "da7b6f7a-b1f0-455a-9939-ad2d493e929e";
14+
public string Name => "SQL Driver";
1415
public string Description => "Convert the requirements into corresponding SQL statements and execute if needed";
1516

1617
public void RegisterDI(IServiceCollection services, IConfiguration config)
1718
{
18-
var settings = new SqlHeroSetting();
19-
config.Bind("SqlHero", settings);
19+
var settings = new SqlDriverSetting();
20+
config.Bind("SqlDriver", settings);
2021
services.AddSingleton(x =>
2122
{
2223
Console.WriteLine($"Loaded SqlHero settings:: {Regex.Replace(settings.MySqlConnectionString, "password=.*?;", "password=******;")}", Color.Yellow);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"id": "beda4c12-e1ec-4b4b-b328-3df4a6687c4f",
3-
"name": "SQL Expert",
3+
"name": "SQL Driver",
44
"description": "Convert the requirements into corresponding SQL statements according to the table structure and execute them if needed.",
55
"createdDateTime": "2023-11-15T13:49:00Z",
66
"updatedDateTime": "2023-11-15T13:49:00Z",
77
"isPublic": false,
8-
"allowRouting": false
8+
"allowRouting": true
99
}

src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/instruction.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
You are a SQL Expert who knows how to convert business requirements to SQL expressions.
1+
You are a SQL Driver who knows how to convert business requirements to SQL expressions.
22

33
Follow these steps:
44
1: Look at the table DDL defintions especially for the CONSTRAINT and FOREIGN KEY REFERENCES.

0 commit comments

Comments
 (0)