diff --git a/BotSharp.sln b/BotSharp.sln index 4934d807..4c109be9 100644 --- a/BotSharp.sln +++ b/BotSharp.sln @@ -9,216 +9,119 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platforms", "Platforms", "{ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{E29DC6C4-5E57-48C5-BCB0-6B8F84782749}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Core", "Infrastructure\BotSharp.Core\BotSharp.Core.csproj", "{EAE30548-2631-4CF5-8EBC-DBF061E169B7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Channel.FacebookMessenger", "src\Channels\BotSharp.Channel.FacebookMessenger\BotSharp.Channel.FacebookMessenger.csproj", "{C623F04D-6947-4316-9377-168066F50B79}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.WebApi", "Infrastructure\BotSharp.WebApi\BotSharp.WebApi.csproj", "{89D4AE72-81BE-4A48-A868-E344D91CDCB9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Channel.Weixin", "src\Channels\BotSharp.Channel.Weixin\BotSharp.Channel.Weixin.csproj", "{E94A2E73-C1C7-434E-B9B5-A39BFED61E45}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Abstraction", "Infrastructure\BotSharp.Abstraction\BotSharp.Abstraction.csproj", "{DDBFBB8C-106C-497F-8158-E50560814B07}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Abstraction", "src\Infrastructure\BotSharp.Abstraction\BotSharp.Abstraction.csproj", "{197885F1-2EB2-4709-B9AA-A777878D74B3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.OpenAi", "Platforms\BotSharp.Platform.OpenAi\BotSharp.Platform.OpenAi.csproj", "{73258881-906C-4014-9453-614A98852733}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Core", "src\Infrastructure\BotSharp.Core\BotSharp.Core.csproj", "{36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Channel.FacebookMessenger", "Channels\BotSharp.Channel.FacebookMessenger\BotSharp.Channel.FacebookMessenger.csproj", "{250B37D3-381E-4A08-9161-55A27FA9075F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.OpenAi", "src\Platforms\BotSharp.Platform.OpenAi\BotSharp.Platform.OpenAi.csproj", "{286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Channel.Weixin", "Channels\BotSharp.Channel.Weixin\BotSharp.Channel.Weixin.csproj", "{281F2794-AB51-4CF9-9214-43A5F23D0F4F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStarter", "src\WebStarter\WebStarter.csproj", "{07AD18C5-CE7B-495A-815F-170E93CCC42A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.Dialogflow", "Platforms\BotSharp.Platform.Dialogflow\BotSharp.Platform.Dialogflow.csproj", "{4F8100FF-431D-4AD2-8095-56350C36DD08}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.AzureAi", "src\Platforms\BotSharp.Platform.AureAi\BotSharp.Platform.AzureAi.csproj", "{B874E946-AE39-4731-8DA5-16A99115D111}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BotUIs", "BotUIs", "{42226933-0A0D-48E8-85EC-AFE773A1F841}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatbotUI", "src\BotUIs\ChatbotUI\ChatbotUI.csproj", "{E33CC7F2-225E-42A9-8B4A-EAA97930D820}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.Local", "src\Platforms\BotSharp.Platform.Local\BotSharp.Platform.Local.csproj", "{7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - ARTICULATE|Any CPU = ARTICULATE|Any CPU - ARTICULATE|x64 = ARTICULATE|x64 Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 - DIALOGFLOW|Any CPU = DIALOGFLOW|Any CPU - DIALOGFLOW|x64 = DIALOGFLOW|x64 - RASA NLU|Any CPU = RASA NLU|Any CPU - RASA NLU|x64 = RASA NLU|x64 - RASA|Any CPU = RASA|Any CPU - RASA|x64 = RASA|x64 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.ARTICULATE|x64.ActiveCfg = Debug|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.ARTICULATE|x64.Build.0 = Debug|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.Debug|x64.ActiveCfg = Debug|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.Debug|x64.Build.0 = Debug|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.DIALOGFLOW|x64.ActiveCfg = Debug|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.DIALOGFLOW|x64.Build.0 = Debug|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.RASA NLU|Any CPU.ActiveCfg = Release|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.RASA NLU|Any CPU.Build.0 = Release|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.RASA NLU|x64.ActiveCfg = Release|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.RASA NLU|x64.Build.0 = Release|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.RASA|Any CPU.ActiveCfg = Release|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.RASA|Any CPU.Build.0 = Release|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.RASA|x64.ActiveCfg = Release|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.RASA|x64.Build.0 = Release|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.Release|Any CPU.Build.0 = Release|Any CPU - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.Release|x64.ActiveCfg = Release|x64 - {EAE30548-2631-4CF5-8EBC-DBF061E169B7}.Release|x64.Build.0 = Release|x64 - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.ARTICULATE|x64.Build.0 = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.Debug|x64.ActiveCfg = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.Debug|x64.Build.0 = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.RASA NLU|Any CPU.ActiveCfg = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.RASA NLU|Any CPU.Build.0 = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.RASA NLU|x64.ActiveCfg = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.RASA NLU|x64.Build.0 = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.RASA|Any CPU.ActiveCfg = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.RASA|Any CPU.Build.0 = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.RASA|x64.ActiveCfg = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.RASA|x64.Build.0 = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.Release|Any CPU.Build.0 = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.Release|x64.ActiveCfg = Release|Any CPU - {89D4AE72-81BE-4A48-A868-E344D91CDCB9}.Release|x64.Build.0 = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.ARTICULATE|x64.Build.0 = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.Debug|x64.ActiveCfg = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.Debug|x64.Build.0 = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.RASA NLU|Any CPU.ActiveCfg = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.RASA NLU|Any CPU.Build.0 = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.RASA NLU|x64.ActiveCfg = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.RASA NLU|x64.Build.0 = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.RASA|Any CPU.ActiveCfg = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.RASA|Any CPU.Build.0 = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.RASA|x64.ActiveCfg = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.RASA|x64.Build.0 = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.Release|Any CPU.Build.0 = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.Release|x64.ActiveCfg = Release|Any CPU - {DDBFBB8C-106C-497F-8158-E50560814B07}.Release|x64.Build.0 = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.ARTICULATE|x64.Build.0 = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.Debug|x64.ActiveCfg = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.Debug|x64.Build.0 = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU - {73258881-906C-4014-9453-614A98852733}.RASA NLU|Any CPU.ActiveCfg = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.RASA NLU|Any CPU.Build.0 = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.RASA NLU|x64.ActiveCfg = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.RASA NLU|x64.Build.0 = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.RASA|Any CPU.ActiveCfg = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.RASA|Any CPU.Build.0 = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.RASA|x64.ActiveCfg = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.RASA|x64.Build.0 = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.Release|Any CPU.Build.0 = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.Release|x64.ActiveCfg = Release|Any CPU - {73258881-906C-4014-9453-614A98852733}.Release|x64.Build.0 = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.ARTICULATE|x64.Build.0 = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.Debug|x64.ActiveCfg = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.Debug|x64.Build.0 = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.RASA NLU|Any CPU.ActiveCfg = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.RASA NLU|Any CPU.Build.0 = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.RASA NLU|x64.ActiveCfg = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.RASA NLU|x64.Build.0 = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.RASA|Any CPU.ActiveCfg = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.RASA|Any CPU.Build.0 = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.RASA|x64.ActiveCfg = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.RASA|x64.Build.0 = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.Release|Any CPU.Build.0 = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.Release|x64.ActiveCfg = Release|Any CPU - {250B37D3-381E-4A08-9161-55A27FA9075F}.Release|x64.Build.0 = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.ARTICULATE|x64.Build.0 = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.Debug|x64.ActiveCfg = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.Debug|x64.Build.0 = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.RASA NLU|Any CPU.ActiveCfg = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.RASA NLU|Any CPU.Build.0 = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.RASA NLU|x64.ActiveCfg = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.RASA NLU|x64.Build.0 = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.RASA|Any CPU.ActiveCfg = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.RASA|Any CPU.Build.0 = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.RASA|x64.ActiveCfg = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.RASA|x64.Build.0 = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.Release|Any CPU.Build.0 = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.Release|x64.ActiveCfg = Release|Any CPU - {281F2794-AB51-4CF9-9214-43A5F23D0F4F}.Release|x64.Build.0 = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.ARTICULATE|x64.Build.0 = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.Debug|x64.ActiveCfg = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.Debug|x64.Build.0 = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.RASA NLU|Any CPU.ActiveCfg = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.RASA NLU|Any CPU.Build.0 = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.RASA NLU|x64.ActiveCfg = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.RASA NLU|x64.Build.0 = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.RASA|Any CPU.ActiveCfg = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.RASA|Any CPU.Build.0 = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.RASA|x64.ActiveCfg = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.RASA|x64.Build.0 = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.Release|Any CPU.Build.0 = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.Release|x64.ActiveCfg = Release|Any CPU - {4F8100FF-431D-4AD2-8095-56350C36DD08}.Release|x64.Build.0 = Release|Any CPU + {C623F04D-6947-4316-9377-168066F50B79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C623F04D-6947-4316-9377-168066F50B79}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C623F04D-6947-4316-9377-168066F50B79}.Debug|x64.ActiveCfg = Debug|Any CPU + {C623F04D-6947-4316-9377-168066F50B79}.Debug|x64.Build.0 = Debug|Any CPU + {C623F04D-6947-4316-9377-168066F50B79}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C623F04D-6947-4316-9377-168066F50B79}.Release|Any CPU.Build.0 = Release|Any CPU + {C623F04D-6947-4316-9377-168066F50B79}.Release|x64.ActiveCfg = Release|Any CPU + {C623F04D-6947-4316-9377-168066F50B79}.Release|x64.Build.0 = Release|Any CPU + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45}.Debug|x64.ActiveCfg = Debug|Any CPU + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45}.Debug|x64.Build.0 = Debug|Any CPU + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45}.Release|Any CPU.Build.0 = Release|Any CPU + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45}.Release|x64.ActiveCfg = Release|Any CPU + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45}.Release|x64.Build.0 = Release|Any CPU + {197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|x64.ActiveCfg = Debug|Any CPU + {197885F1-2EB2-4709-B9AA-A777878D74B3}.Debug|x64.Build.0 = Debug|Any CPU + {197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|Any CPU.Build.0 = Release|Any CPU + {197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|x64.ActiveCfg = Release|Any CPU + {197885F1-2EB2-4709-B9AA-A777878D74B3}.Release|x64.Build.0 = Release|Any CPU + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|x64.ActiveCfg = Debug|x64 + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Debug|x64.Build.0 = Debug|x64 + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|Any CPU.Build.0 = Release|Any CPU + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|x64.ActiveCfg = Release|x64 + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815}.Release|x64.Build.0 = Release|x64 + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}.Debug|x64.ActiveCfg = Debug|Any CPU + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}.Debug|x64.Build.0 = Debug|Any CPU + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}.Release|Any CPU.Build.0 = Release|Any CPU + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}.Release|x64.ActiveCfg = Release|Any CPU + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A}.Release|x64.Build.0 = Release|Any CPU + {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|x64.ActiveCfg = Debug|Any CPU + {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|x64.Build.0 = Debug|Any CPU + {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|Any CPU.Build.0 = Release|Any CPU + {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|x64.ActiveCfg = Release|Any CPU + {07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|x64.Build.0 = Release|Any CPU + {B874E946-AE39-4731-8DA5-16A99115D111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B874E946-AE39-4731-8DA5-16A99115D111}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B874E946-AE39-4731-8DA5-16A99115D111}.Debug|x64.ActiveCfg = Debug|Any CPU + {B874E946-AE39-4731-8DA5-16A99115D111}.Debug|x64.Build.0 = Debug|Any CPU + {B874E946-AE39-4731-8DA5-16A99115D111}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B874E946-AE39-4731-8DA5-16A99115D111}.Release|Any CPU.Build.0 = Release|Any CPU + {B874E946-AE39-4731-8DA5-16A99115D111}.Release|x64.ActiveCfg = Release|Any CPU + {B874E946-AE39-4731-8DA5-16A99115D111}.Release|x64.Build.0 = Release|Any CPU + {E33CC7F2-225E-42A9-8B4A-EAA97930D820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E33CC7F2-225E-42A9-8B4A-EAA97930D820}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E33CC7F2-225E-42A9-8B4A-EAA97930D820}.Debug|x64.ActiveCfg = Debug|Any CPU + {E33CC7F2-225E-42A9-8B4A-EAA97930D820}.Debug|x64.Build.0 = Debug|Any CPU + {E33CC7F2-225E-42A9-8B4A-EAA97930D820}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E33CC7F2-225E-42A9-8B4A-EAA97930D820}.Release|Any CPU.Build.0 = Release|Any CPU + {E33CC7F2-225E-42A9-8B4A-EAA97930D820}.Release|x64.ActiveCfg = Release|Any CPU + {E33CC7F2-225E-42A9-8B4A-EAA97930D820}.Release|x64.Build.0 = Release|Any CPU + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}.Debug|x64.ActiveCfg = Debug|Any CPU + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}.Debug|x64.Build.0 = Debug|Any CPU + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}.Release|Any CPU.Build.0 = Release|Any CPU + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}.Release|x64.ActiveCfg = Release|Any CPU + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {EAE30548-2631-4CF5-8EBC-DBF061E169B7} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749} - {89D4AE72-81BE-4A48-A868-E344D91CDCB9} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749} - {DDBFBB8C-106C-497F-8158-E50560814B07} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749} - {73258881-906C-4014-9453-614A98852733} = {FFA662D3-B67B-478D-92FC-76DC5EB64412} - {250B37D3-381E-4A08-9161-55A27FA9075F} = {FC2A12DB-AC88-41E4-A58C-9EEC6DAD91E1} - {281F2794-AB51-4CF9-9214-43A5F23D0F4F} = {FC2A12DB-AC88-41E4-A58C-9EEC6DAD91E1} - {4F8100FF-431D-4AD2-8095-56350C36DD08} = {FFA662D3-B67B-478D-92FC-76DC5EB64412} + {C623F04D-6947-4316-9377-168066F50B79} = {FC2A12DB-AC88-41E4-A58C-9EEC6DAD91E1} + {E94A2E73-C1C7-434E-B9B5-A39BFED61E45} = {FC2A12DB-AC88-41E4-A58C-9EEC6DAD91E1} + {197885F1-2EB2-4709-B9AA-A777878D74B3} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749} + {36F5CEBD-31A8-4BEF-8BAA-BAC4E63E4815} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749} + {286C7DE5-1EBC-4D28-AB25-4FAAD4C31D2A} = {FFA662D3-B67B-478D-92FC-76DC5EB64412} + {B874E946-AE39-4731-8DA5-16A99115D111} = {FFA662D3-B67B-478D-92FC-76DC5EB64412} + {E33CC7F2-225E-42A9-8B4A-EAA97930D820} = {42226933-0A0D-48E8-85EC-AFE773A1F841} + {7ECA0231-ECE5-416B-AC61-9B1A8DACCD39} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A9969D89-C98B-40A5-A12B-FC87E55B3A19} diff --git a/Infrastructure/BotSharp.Abstraction/Enums/LlmResponseExtractType.cs b/Infrastructure/BotSharp.Abstraction/Enums/LlmResponseExtractType.cs deleted file mode 100644 index 9ab73f61..00000000 --- a/Infrastructure/BotSharp.Abstraction/Enums/LlmResponseExtractType.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Abstraction.Enums; - -public enum LlmResponseExtractType -{ - Text = 1, - Html = 2, - Json = 3 -} diff --git a/Infrastructure/BotSharp.Abstraction/ILlmAgent.cs b/Infrastructure/BotSharp.Abstraction/ILlmAgent.cs deleted file mode 100644 index 1e1a8263..00000000 --- a/Infrastructure/BotSharp.Abstraction/ILlmAgent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Abstraction.Models; -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; - -namespace Abstraction; - -public interface ILlmAgent : IDisposable -{ - bool LoggedIn { get; } - Task OpenDriver(); - Task Login(); - LlmResponse NewSession(LlmPromptInput prompt); - LlmResponse Interact(LlmPromptInput input, bool isAsync); -} diff --git a/Infrastructure/BotSharp.Abstraction/Models/LlmPromptInput.cs b/Infrastructure/BotSharp.Abstraction/Models/LlmPromptInput.cs deleted file mode 100644 index 57482def..00000000 --- a/Infrastructure/BotSharp.Abstraction/Models/LlmPromptInput.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Abstraction.Enums; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Cryptography; -using System.Text; - -namespace Abstraction.Models; - -public class LlmPromptInput -{ - public string Model { get; set; } = string.Empty; - public LlmResponseExtractType Format { get; set; } - public string SessionId { get; set; } = string.Empty; - public List Prompts { get; set; } = new List(); - - public override int GetHashCode() - { - var value = SessionId + "-" + string.Join(" | ", Prompts); - return Md5(value).GetHashCode(); - } - - private string Md5(string input) - { - using var md5 = MD5.Create(); - var byteHash = md5.ComputeHash(Encoding.UTF8.GetBytes(input.ToLower())); - return BitConverter.ToString(byteHash).Replace("-", "").ToLower(); - } - - public override string ToString() - { - return $"{SessionId}: {Prompts.FirstOrDefault()}"; - } -} diff --git a/Infrastructure/BotSharp.Abstraction/Models/LlmResponse.cs b/Infrastructure/BotSharp.Abstraction/Models/LlmResponse.cs deleted file mode 100644 index cc19700b..00000000 --- a/Infrastructure/BotSharp.Abstraction/Models/LlmResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Abstraction.Enums; - -namespace Abstraction.Models; - -public class LlmResponse -{ - public string Model { get; set; } = string.Empty; - public LlmResponseExtractType Format { get; set; } - public string SessionId { get; set; } = string.Empty; - public string Content { get; set; } = string.Empty; - public bool Success { get; set; } -} diff --git a/Infrastructure/BotSharp.Abstraction/Models/OpenAiSettings.cs b/Infrastructure/BotSharp.Abstraction/Models/OpenAiSettings.cs deleted file mode 100644 index 39a11dc3..00000000 --- a/Infrastructure/BotSharp.Abstraction/Models/OpenAiSettings.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Abstraction.Models; - -public class OpenAiSettings -{ - public string UserName { get; set; } - public string Password { get; set; } - public bool IsGoogleAccount { get; set; } -} diff --git a/Platforms/BotSharp.Platform.Dialogflow/BotSharp.Platform.Dialogflow.csproj b/Platforms/BotSharp.Platform.Dialogflow/BotSharp.Platform.Dialogflow.csproj deleted file mode 100644 index 6f08cda5..00000000 --- a/Platforms/BotSharp.Platform.Dialogflow/BotSharp.Platform.Dialogflow.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - - netstandard2.1 - true - 0.2.2 - true - $(NoWarn);1591 - - - - Haiping Chen - BotSharp platform emulator which is compatible with Google Dialogflow. - https://github.com/Oceania2018/botsharp-dialogflow - Apache 2.0 - https://github.com/Oceania2018/botsharp-dialogflow - git - Dialogflow,Chatbot - - - - DEBUG;TRACE - - - - - - - - - - - diff --git a/Platforms/BotSharp.Platform.Dialogflow/README.md b/Platforms/BotSharp.Platform.Dialogflow/README.md deleted file mode 100644 index a127c221..00000000 --- a/Platforms/BotSharp.Platform.Dialogflow/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# botsharp-dialogflow -BotSharp platform extension which is compatible with Google Dialogflow. - -### How to install -``` -PM> Install-Package BotSharp.Platform.Dialogflow -``` - -### How to use -``` -private IPlatformBuilder nluPlatform = null; -public CustomMessageHandler(IPlatformBuilder nluPlatform) -{ - this.nluPlatform = nluPlatform; -} - -// send text to BotSharp platform emulator -var aIResponse = nluPlatform.TextRequest(new AiRequest -{ - Text = requestMessage.Content, - AgentId = "REPLACE_AGENT_ID", // replace to your chabot's id - SessionId = requestMessage.FromUserName -}); - -``` -### How to run locally -``` -git clone https://github.com/dotnetcore/BotSharp -``` \ No newline at end of file diff --git a/Platforms/BotSharp.Platform.OpenAi/GPT-4.ExtractGptResponse.cs b/Platforms/BotSharp.Platform.OpenAi/GPT-4.ExtractGptResponse.cs deleted file mode 100644 index 219c731a..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/GPT-4.ExtractGptResponse.cs +++ /dev/null @@ -1,84 +0,0 @@ -using Abstraction.Enums; -using Microsoft.Extensions.DependencyInjection; -using OpenQA.Selenium; -using OpenQA.Selenium.Support.UI; -using StackExchange.Redis; -using System; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; - -namespace ChatGPT; - -public partial class GPT4 -{ - private async Task ExtractResponseAsync(string sessionId, LlmResponseExtractType format) - { - var redis = _serviceProvider.GetRequiredService(); - var db = redis.GetDatabase(); - - var tokenSource = new CancellationTokenSource(); - tokenSource.CancelAfter(TimeSpan.FromSeconds(60)); - var token = tokenSource.Token; - Console.WriteLine(); - - await Task.Run(async () => - { - while (!token.IsCancellationRequested ) - { - Thread.Sleep(100); - var regenerateResponse = _driver.FindElements(By.XPath("//div[text()='Regenerate response']")); - var end = regenerateResponse.Count > 0 ? "1" : "0"; - var element = _driver.FindElements(By.CssSelector("main div.text-base")).Last(); - var content = element.GetAttribute("innerText").Trim(); - - if (string.IsNullOrEmpty(content)) - { - continue; - } - - await db.StreamAddAsync(sessionId, new[] - { - new NameValueEntry("content", content), - new NameValueEntry("end", end) - }); - - if(end == "1") - { - tokenSource.Cancel(); - } - } - }); - } - - private string ExtractGptResponse(LlmResponseExtractType format) - { - new WebDriverWait(_driver, TimeSpan.FromSeconds(180)) - .Until(drv => drv.FindElement(By.XPath("//div[text()='Regenerate response']"))); - - var element = _driver.FindElements(By.CssSelector("main div.text-base")).Last(); - if (string.IsNullOrEmpty(element.GetAttribute("innerText"))) - { - return string.Empty; - } - - var content = element.GetAttribute("innerText"); - if (format == LlmResponseExtractType.Json) - { - content = content.Replace("\r", "").Replace("\n", ""); - content = content.Replace("Explanation:", "\nExplanation:"); - var json = Regex.Match(content, "{[ ]{0,}(\").*}").Value; - return json; - } - else - { - var responses = _driver.FindElements(By.CssSelector("div.markdown")); - if (format == LlmResponseExtractType.Html) - return responses.Last().GetAttribute("innerHTML"); - else - return responses.Last().Text; - } - } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/GPT-4.Input.cs b/Platforms/BotSharp.Platform.OpenAi/GPT-4.Input.cs deleted file mode 100644 index ca996832..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/GPT-4.Input.cs +++ /dev/null @@ -1,43 +0,0 @@ -using OpenQA.Selenium; -using OpenQA.Selenium.Interactions; -using System; -using System.Runtime.InteropServices; - -namespace ChatGPT; - -public partial class GPT4 -{ - [DllImport("user32.dll")] - internal static extern bool OpenClipboard(IntPtr hWndNewOwner); - - [DllImport("user32.dll")] - internal static extern bool CloseClipboard(); - - [DllImport("user32.dll")] - internal static extern bool SetClipboardData(uint uFormat, IntPtr data); - - private void InputText(IWebElement textarea, string text) - { - OpenClipboard(IntPtr.Zero); - var ptr = Marshal.StringToHGlobalUni(text); - SetClipboardData(13, ptr); - CloseClipboard(); - - //textarea.ScrollTopToBottom(); - var actions = new Actions(_driver); - actions.MoveToElement(textarea) - .Click(textarea) - .KeyDown(Keys.LeftControl).KeyDown("v") - .KeyUp(Keys.LeftControl).KeyUp("v") - .Perform(); - //textarea.ScrollTopToBottom(); - } - - private void InputNewLine() - { - var actions = new Actions(_driver); - actions.KeyDown(Keys.Shift).KeyDown(Keys.Enter) - .KeyUp(Keys.Shift).KeyUp(Keys.Enter) - .Perform(); - } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/GPT-4.Interact.cs b/Platforms/BotSharp.Platform.OpenAi/GPT-4.Interact.cs deleted file mode 100644 index 53ec7043..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/GPT-4.Interact.cs +++ /dev/null @@ -1,139 +0,0 @@ -using Abstraction.Models; -using ChatGPT.Models; -using Newtonsoft.Json; -using OpenQA.Selenium; -using OpenQA.Selenium.Support.Extensions; -using System; -using System.Threading; - -namespace ChatGPT; - -public partial class GPT4 -{ - public LlmResponse Interact(LlmPromptInput input, bool isAsync) - { - /*var msg = new ConversationPost - { - Action = "next", - Model = "gpt-4", - VariantPurpose = "none", - Messages = new System.Collections.Generic.List - { - new ConversationMessageBody - { - Id = Guid.NewGuid().ToString(), - Author = new ConversationAuthor - { - Role = "user" - }, - Content = new ConversationContent - { - ContentType = "text", - Parts = input.Prompts - } - } - }, - ParentMessageId = Guid.NewGuid().ToString() - }; - - var js = @$"var xhr = new XMLHttpRequest(); - xhr.open('POST', 'https://chat.openai.com/backend-api/conversation', false); - xhr.setRequestHeader('Content-type', 'application/json'); - xhr.setRequestHeader('authorization','Bearer {_token.AccessToken}'); - xhr.send('{JsonConvert.SerializeObject(msg)}'); - return xhr.response;"; - - var json = _driver.ExecuteJavaScript(js);*/ - - Console.WriteLine($"---------- {input.SessionId} {DateTime.UtcNow}"); - Console.WriteLine(string.Join('\r', input.Prompts)); - - var response = new LlmResponse - { - SessionId = input.SessionId, - Format = input.Format, - Success = true - }; - - // Switch to session window - if (!string.IsNullOrEmpty(input.SessionId) && input.SessionId != Guid.Empty.ToString()) - { - if (!_activeTabs.ContainsKey(input.SessionId)) - { - bool activated = false; - foreach (var tab in _driver.WindowHandles) - { - _driver.SwitchTo().Window(tab); - if (_driver.Url.Contains(input.SessionId)) - { - activated = true; - break; - } - } - - if (!activated) - { - _driver.Navigate().GoToUrl($"https://chat.openai.com/chat/{input.SessionId}"); - } - } - } - else - { - _driver.SwitchTo().Window(_driver.WindowHandles[0]); - } - - Thread.Sleep(1000); - var textarea = _driver.FindElement(By.CssSelector("main textarea")); - bool isFirstLine = true; - foreach (var p in input.Prompts) - { - if (string.IsNullOrEmpty(p)) - { - InputNewLine(); - } - else - { - if (!isFirstLine) - { - InputNewLine(); - } - - var text = p;//.Replace("\r", "\n"); - /*foreach (var c in text.Split('\n')) - { - if (c.Length > 128) - { - InputText(textarea, c); - } - else - { - textarea.SendKeys(c); - } - InputNewLine(); - }*/ - - if (text.Length > 64) - { - InputText(textarea, text); - } - else - { - textarea.SendKeys(text); - } - isFirstLine = false; - } - } - textarea.SendKeys(Keys.Enter); - - if (isAsync) - { - ExtractResponseAsync(input.SessionId, input.Format); - } - else - { - response.Content = ExtractGptResponse(input.Format); - } - - return response; - } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/GPT-4.Login.cs b/Platforms/BotSharp.Platform.OpenAi/GPT-4.Login.cs deleted file mode 100644 index 699879dc..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/GPT-4.Login.cs +++ /dev/null @@ -1,111 +0,0 @@ -using Abstraction.Models; -using ChatGPT.Models; -using Microsoft.Extensions.DependencyInjection; -using Newtonsoft.Json; -using OpenQA.Selenium; -using OpenQA.Selenium.Support.Extensions; -using OpenQA.Selenium.Support.UI; -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace ChatGPT; - -public partial class GPT4 -{ - bool _isLoggedIn = false; - public bool LoggedIn => _isLoggedIn; - GetTokenResponse _token; - - public async Task Login() - { - if (_isLoggedIn) - { - return; - } - - await OpenDriver(); - - _driver.Navigate().GoToUrl("https://chat.openai.com/"); - - var textarea = _driver.FindElements(By.CssSelector("main textarea")); - if (textarea.Count() == 1) - { - _isLoggedIn = true; - return; - } - - // https://selenium-python.readthedocs.io/waits.html - new WebDriverWait(_driver, TimeSpan.FromSeconds(5)) - .Until(drv => drv.FindElement(By.TagName("button"))); - - // https://selenium-python.readthedocs.io/locating-elements.html#locating-elements-by-class-name - var loginButton = _driver.FindElement(By.TagName("button")); - loginButton.Click(); - - var openAiSettings = _serviceProvider.GetRequiredService(); - - // login in Google account - // LoginInGoogleAccount(openAiSettings); - - // login in username - LoginInUserName(openAiSettings); - } - - private void LoginInGoogleAccount(OpenAiSettings openAiSettings) - { - var continueWithGoogle = _driver.FindElement(By.XPath("//button[@data-provider='google']")); - continueWithGoogle.Click(); - - var email = _driver.FindElement(By.Id("identifierId")); - email.SendKeys(openAiSettings.UserName); - - var next = _driver.FindElement(By.XPath("//span[text()='Next']/..")); - next.Click(); - } - - private void LoginInUserName(OpenAiSettings openAiSettings) - { - new WebDriverWait(_driver, TimeSpan.FromSeconds(5)) - .Until(drv => drv.FindElement(By.Id("username"))); - var userName = _driver.FindElement(By.Id("username")); - userName.SendKeys(openAiSettings.UserName); - - var actionButton = _driver.FindElement(By.Name("action")); - actionButton.Click(); - - Thread.Sleep(300); - new WebDriverWait(_driver, TimeSpan.FromSeconds(5)) - .Until(drv => drv.FindElement(By.Id("password"))); - var password = _driver.FindElement(By.Id("password")); - password.SendKeys(openAiSettings.Password); - - actionButton = _driver.FindElement(By.Name("action")); - actionButton.Click(); - - Thread.Sleep(300); - /*new WebDriverWait(_driver, TimeSpan.FromSeconds(5)) - .Until(drv => drv.FindElement(By.CssSelector(@"div#headlessui-dialog-panel-\:r1\: button"))); - - // https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors/Type_Class_and_ID_Selectors#id_selectors - for (int i = 0; i < 3; i++) - { - Thread.Sleep(300); - - var inputs = _driver.FindElements(By.CssSelector(@"div#headlessui-dialog-panel-\:r1\: button")); - inputs.Last().Click(); - }*/ - - var js = @"var xhr = new XMLHttpRequest(); - xhr.open('GET', 'https://chat.openai.com/api/auth/session', false); - xhr.setRequestHeader('Content-type', 'application/json'); - xhr.send(); - return xhr.response;"; - - var json = _driver.ExecuteJavaScript(js); - _token = JsonConvert.DeserializeObject(json); - - _isLoggedIn = true; - } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/GPT-4.NewSession.cs b/Platforms/BotSharp.Platform.OpenAi/GPT-4.NewSession.cs deleted file mode 100644 index 76b9e2da..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/GPT-4.NewSession.cs +++ /dev/null @@ -1,105 +0,0 @@ -using Abstraction.Models; -using ChatGPT.Models; -using Newtonsoft.Json; -using OpenQA.Selenium; -using OpenQA.Selenium.Support.Extensions; -using System; -using System.Linq; -using System.Threading; - -namespace ChatGPT; - -public partial class GPT4 -{ - public LlmResponse NewSession(LlmPromptInput prompt) - { - if (!LoggedIn) - { - return new LlmResponse - { - Format = prompt.Format, - Content = "Please login agent first.", - Model = prompt.Model - }; - } - - // Active default window - var window = _driver.WindowHandles[0]; - _driver.SwitchTo().Window(window); - - // New session - var newChat = _driver.FindElement(By.XPath("//a[text()='New chat']")); - newChat.Click(); - - Thread.Sleep(200); - - var models = _driver.FindElements(By.XPath($"//span[text()='{prompt.Model}']/../..")); - if (models.Count == 0) - { - // Choose model - var modelSelector = _driver.FindElement(By.XPath($"//span[text()='Default (GPT-3.5)']/../..")); - modelSelector.Click(); - - // Switch model - var gpt4 = _driver.FindElement(By.XPath($"//span[text()='{prompt.Model}']/../..")); - gpt4.Click(); - } - - var response = Interact(prompt, false); - - #region Get Session Id - if (_token == null) - { - // Extract current session id - if (Guid.TryParse(_driver.Url.Split('/').Last(), out Guid sessionId)) - { - response.SessionId = sessionId.ToString(); - } - } - else - { - var js = @$"var xhr = new XMLHttpRequest(); - xhr.open('GET', 'https://chat.openai.com/backend-api/conversations?offset=0&limit=20', false); - xhr.setRequestHeader('Content-type', 'application/json'); - xhr.setRequestHeader('authorization','Bearer {_token.AccessToken}'); - xhr.send(); - return xhr.response;"; - - var json = _driver.ExecuteJavaScript(js); - var conversations = JsonConvert.DeserializeObject>(json); - response.SessionId = conversations.Items.First().Id; - } - /*while (string.IsNullOrEmpty(response.Sessionid) || response.Sessionid == Guid.Empty.ToString()) - { - _driver.WaitMiliseconds(200); - - newChat = _driver.FindElement(By.XPath("//a[text()='New chat']")); - newChat.Click(); - - _driver.WaitMiliseconds(200); - - var currentChatTabs = _driver.FindElements(By.CssSelector("nav div a")); - currentChatTabs.First().Click(); - - _driver.WaitMiliseconds(200); - - // Extract current session id - if (Guid.TryParse(_driver.Url.Split('/').Last(), out Guid sessionId)) - { - response.Sessionid = sessionId.ToString(); - } - }*/ - #endregion - - newChat = _driver.FindElement(By.XPath("//a[text()='New chat']")); - newChat.Click(); - - // Open a new tab - _driver.SwitchTo().NewWindow(WindowType.Tab); - _driver.Navigate().GoToUrl($"https://chat.openai.com/chat/{response.SessionId}"); - - _activeTabs[response.SessionId] = _driver.CurrentWindowHandle; - - return response; - } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/GPT-4.cs b/Platforms/BotSharp.Platform.OpenAi/GPT-4.cs deleted file mode 100644 index 0d72bc34..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/GPT-4.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Abstraction; -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; -using SeleniumUndetectedChromeDriver; -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; - -namespace ChatGPT; - -public partial class GPT4 : ILlmAgent -{ - private IWebDriver _driver; - private readonly IServiceProvider _serviceProvider; - - /// - /// SessionId - WindowHandle - /// - private Dictionary _activeTabs = new Dictionary(); - - public GPT4(IServiceProvider serviceProvider) - { - _serviceProvider = serviceProvider; - } - - public async Task OpenDriver() - { - var path = await new ChromeDriverInstaller().Auto(); - var options = new ChromeOptions - { - }; - options.AddArgument("--no-sandbox"); - options.AddArgument("--disable-dev-shm-usage"); - _driver = UndetectedChromeDriver.Create(options, - driverExecutablePath: path); - } - - public void Dispose() - { - _driver.Quit(); - } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/Models/ConversationListResponse.cs b/Platforms/BotSharp.Platform.OpenAi/Models/ConversationListResponse.cs deleted file mode 100644 index 7845feac..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/Models/ConversationListResponse.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ChatGPT.Models; - -public class ConversationListResponse -{ - public string Id { get; set; } - public string Title { get; set; } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/Models/ConversationPost.cs b/Platforms/BotSharp.Platform.OpenAi/Models/ConversationPost.cs deleted file mode 100644 index 95d6f660..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/Models/ConversationPost.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Text; - -namespace ChatGPT.Models; - -public class ConversationPost -{ - [JsonProperty("action")] - public string Action { get; set; } = "action"; - - [JsonProperty("messages")] - public List Messages { get; set; } - - [JsonProperty("parent_message_id")] - public string ParentMessageId { get; set; } - - [JsonProperty("model")] - public string Model { get; set; } - - [JsonProperty("timezone_offset_min")] - public int TimezoneOffsetMin { get; set; } - - [JsonProperty("variant_purpose")] - public string VariantPurpose { get; set; } = "none"; -} - -public class ConversationMessageBody -{ - [JsonProperty("id")] - public string Id { get; set; } - - [JsonProperty("author")] - public ConversationAuthor Author { get; set; } - - [JsonProperty("content")] - public ConversationContent Content { get; set; } -} - -public class ConversationAuthor -{ - [JsonProperty("role")] - public string Role { get; set; } -} - -public class ConversationContent -{ - [JsonProperty("content_type")] - public string ContentType { get; set; } - - [JsonProperty("parts")] - public List Parts { get; set; } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/Models/GetTokenResponse.cs b/Platforms/BotSharp.Platform.OpenAi/Models/GetTokenResponse.cs deleted file mode 100644 index 8fb16719..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/Models/GetTokenResponse.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ChatGPT.Models; - -public class GetTokenResponse -{ - public DateTime Expires { get; set; } - public string AccessToken { get; set; } -} diff --git a/Platforms/BotSharp.Platform.OpenAi/Models/ListResponse.cs b/Platforms/BotSharp.Platform.OpenAi/Models/ListResponse.cs deleted file mode 100644 index 37cdf415..00000000 --- a/Platforms/BotSharp.Platform.OpenAi/Models/ListResponse.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Text; -using System.Text.Json.Serialization; - -namespace ChatGPT.Models; - -public class ListResponse -{ - public int Total { get; set; } - public int Offset { get; set; } - [JsonProperty("has_missing_conversations")] - public bool HasMissingConversations { get; set; } - public List Items { get; set; } = new List(); -} diff --git a/README.md b/README.md index 979eb171..a84b4422 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # The Open Source AI Chatbot Platform Builder +[![Discord](https://img.shields.io/discord/1106946823282761851?label=Discord)](https://discord.gg/qRVm82fKTS) +[![QQ群聊](https://img.shields.io/static/v1?label=QQ&message=群聊&color=brightgreen)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=sN9VVMwbWjs5L0ATpizKKxOcZdEPMrp8&authKey=RLDw41bLTrEyEgZZi%2FzT4pYk%2BwmEFgFcrhs8ZbkiVY7a4JFckzJefaYNW6Lk4yPX&noverify=0&group_code=985366726) [![Join the chat at https://gitter.im/publiclab/publiclab](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sci-sharp/community) [![Apache 2.0](https://img.shields.io/hexpm/l/plug.svg)](https://raw.githubusercontent.com/Oceania2018/BotSharp/master/LICENSE) [![NuGet](https://img.shields.io/nuget/dt/BotSharp.Core.svg)](https://www.nuget.org/packages/BotSharp.Core) @@ -10,8 +12,6 @@ **BotSharp** is an open source machine learning framework for AI Bot platform builder. This project involves natural language understanding, computer vision and audio processing technologies, and aims to promote the development and application of intelligent robot assistants in information systems. Out-of-the-box machine learning algorithms allow ordinary programmers to develop artificial intelligence applications faster and easier. - - It's written in C# running on .Net Core that is full cross-platform framework. C# is a enterprise grade programming language which is widely used to code business logic in information management related system. More friendly to corporate developers. BotSharp adopts machine learning algrithm in C# directly. That will facilitate the feature of the typed language C#, and be more easier when refactoring code in system scope. Why we do this? Because we all know Python is not friendly programming language for enterprise developers, it's not only because it's low performance but also it's a type weak language, it will be a disaster if you use Python to build your bussiness system. @@ -20,22 +20,16 @@ BotSharp is in accordance with components principle strictly, decouples every pa ### Some Features -* Integrated debugging is easier without relying on any other machine learning algorithm libraries. -* Built-in multi-Agents management, easy to build Bot as a Service platform. -* Context In/ Out with lifespan to make conversion flow be controllable. -* Use the natural language processing pipeline mechanism to work with extensions easily, and build your own unique robot processing flows. -* Rewrote NLP algorithm from ground without historical issues. +* Built-in multi-agents and conversation management. +* Support multiple LLM platforms. * Support export/ import agent from other bot platforms directly. -* Support different UI providers like `Rasa UI` and `Articulate UI`. -* Support for multiple data request and response formats such as Rasa NLU and Dialogflow. -* Integrate with popular social platforms like Facebook Messenger, Slack and Telegram. -* Multi-core parallel computing optimization, High-Performance C# on GPUs in Hybridizer. +* Support different open source UI [Chatbot UI](src\BotUIs\ChatbotUI\Chatbot-UI.md). +* 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. -* Select dialogflow or articulate to make it work. You can use docker compose to run BotSharp quickly, make sure you've got `Docker`_ installed. @@ -45,20 +39,16 @@ You can use docker compose to run BotSharp quickly, make sure you've got `Docker PS D:\BotSharp\> docker-compose -f dockerfiles/docker-compose-core.yml up ``` -Point your web browser at http://localhost:3112 and enjoy BotSharp Core. +Point your web browser at http://localhost:5500 and enjoy BotSharp Core. ### Extension Libraries BotSharp uses component design, the kernel is kept to a minimum, and business functions are implemented by external components. The modular design also allows contributors to better participate. -* BotSharp platform emulator extension which is compatible with RASA NLU. -* BotSharp platform emulator extension which is compatible with Google Dialogflow. -* BotSharp platform emulator extension which is compatible with Articulate AI. -* BotSharp platform emulator extension which is compatible with RasaTalk. +* Chatbot UI connector. * A channel module of BotSharp for Facebook Messenger. * A channel module of BotSharp for Tencent Wechat. * A channel module of BotSharp for Telegram. -* Articulate UI customized for BotSharp NLU. ### Documents diff --git a/src/BotUIs/ChatbotUI/Chatbot-UI.md b/src/BotUIs/ChatbotUI/Chatbot-UI.md new file mode 100644 index 00000000..23c8541d --- /dev/null +++ b/src/BotUIs/ChatbotUI/Chatbot-UI.md @@ -0,0 +1,32 @@ +# Chatbot UI +[Chatbot UI](https://github.com/mckaywrigley/chatbot-ui) is an open source chat UI for AI models. + +```shell +git clone https://github.com/mckaywrigley/chatbot-ui +npm i +npm run dev +``` + +* Rename `.env.local.example` to `.env.local` + +### Azure OpenAI +```shell +# Chatbot UI +OPENAI_API_TYPE=azure +OPENAI_API_VERSION=2023-03-15-preview +AZURE_DEPLOYMENT_ID= +OPENAI_API_KEY= +DEFAULT_MODEL=gpt-35-turbo +OPENAI_API_HOST= +NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT= +``` + +### OpenAI ChatGPT +```shell +# Chatbot UI +DEFAULT_MODEL=gpt-3.5-turbo +NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT= +OPENAI_API_KEY=YOUR_KEY +OPENAI_API_HOST=https://api.openai.com +``` + diff --git a/src/BotUIs/ChatbotUI/ChatbotUI.csproj b/src/BotUIs/ChatbotUI/ChatbotUI.csproj new file mode 100644 index 00000000..ad4bc398 --- /dev/null +++ b/src/BotUIs/ChatbotUI/ChatbotUI.csproj @@ -0,0 +1,17 @@ + + + + netstandard2.1 + enable + 10 + + + + + + + + + + + diff --git a/src/BotUIs/ChatbotUI/ChatbotUiController.cs b/src/BotUIs/ChatbotUI/ChatbotUiController.cs new file mode 100644 index 00000000..335b9525 --- /dev/null +++ b/src/BotUIs/ChatbotUI/ChatbotUiController.cs @@ -0,0 +1,39 @@ +using BotSharp.Abstraction; +using BotSharp.Abstraction.Models; +using ChatbotUI.ViewModels; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using System.Collections.Generic; + +namespace BotSharp.Platform.AzureAi.Controllers; + +[ApiController] +public class ChatbotUiController : ControllerBase, IBotUiAdapter +{ + private readonly ILogger _logger; + + public ChatbotUiController(ILogger logger) + { + _logger = logger; + } + + [HttpGet("/v1/models")] + [HttpGet("/openai/deployments")] + public OpenAiModels GetOpenAiModels() + { + return new OpenAiModels + { + Data = new List + { + new AiModel + { + Id = "gpt-3.5-turbo", + Model = "gpt-3.5-turbo", + Name = "Default (GPT-3.5)", + MaxLength = 4000, + TokenLimit = 4000 + } + } + }; + } +} \ No newline at end of file diff --git a/src/BotUIs/ChatbotUI/ViewModels/OpenAiModels.cs b/src/BotUIs/ChatbotUI/ViewModels/OpenAiModels.cs new file mode 100644 index 00000000..e6779227 --- /dev/null +++ b/src/BotUIs/ChatbotUI/ViewModels/OpenAiModels.cs @@ -0,0 +1,9 @@ +using BotSharp.Abstraction.Models; +using System.Collections.Generic; + +namespace ChatbotUI.ViewModels; + +public class OpenAiModels +{ + public List Data { get; set; } = new List(); +} diff --git a/Infrastructure/BotSharp.WebApi/BotSharp.WebApi.csproj b/src/Channels/BotSharp.Channel.FacebookMessenger/BotSharp.Channel.FacebookMessenger.csproj similarity index 55% rename from Infrastructure/BotSharp.WebApi/BotSharp.WebApi.csproj rename to src/Channels/BotSharp.Channel.FacebookMessenger/BotSharp.Channel.FacebookMessenger.csproj index 3423f6cd..d4c395e8 100644 --- a/Infrastructure/BotSharp.WebApi/BotSharp.WebApi.csproj +++ b/src/Channels/BotSharp.Channel.FacebookMessenger/BotSharp.Channel.FacebookMessenger.csproj @@ -2,9 +2,6 @@ netstandard2.1 - 10.0 - enable - enable diff --git a/Channels/BotSharp.Channel.Weixin/BotSharp.Channel.Weixin.csproj b/src/Channels/BotSharp.Channel.Weixin/BotSharp.Channel.Weixin.csproj similarity index 87% rename from Channels/BotSharp.Channel.Weixin/BotSharp.Channel.Weixin.csproj rename to src/Channels/BotSharp.Channel.Weixin/BotSharp.Channel.Weixin.csproj index 714e109e..d1ee4dc0 100644 --- a/Channels/BotSharp.Channel.Weixin/BotSharp.Channel.Weixin.csproj +++ b/src/Channels/BotSharp.Channel.Weixin/BotSharp.Channel.Weixin.csproj @@ -23,8 +23,4 @@ - - - - diff --git a/Channels/BotSharp.Channel.Weixin/README.md b/src/Channels/BotSharp.Channel.Weixin/README.md similarity index 100% rename from Channels/BotSharp.Channel.Weixin/README.md rename to src/Channels/BotSharp.Channel.Weixin/README.md diff --git a/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj b/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj similarity index 100% rename from Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj rename to src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj diff --git a/src/Infrastructure/BotSharp.Abstraction/IBotUiAdapter.cs b/src/Infrastructure/BotSharp.Abstraction/IBotUiAdapter.cs new file mode 100644 index 00000000..5d4bfc40 --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/IBotUiAdapter.cs @@ -0,0 +1,9 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace BotSharp.Abstraction; + +public interface IBotUiAdapter +{ +} diff --git a/src/Infrastructure/BotSharp.Abstraction/ITaskRouter.cs b/src/Infrastructure/BotSharp.Abstraction/ITaskRouter.cs new file mode 100644 index 00000000..546257ff --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/ITaskRouter.cs @@ -0,0 +1,9 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace BotSharp.Abstraction; + +public interface ITaskRouter +{ +} diff --git a/src/Infrastructure/BotSharp.Abstraction/Models/AiModel.cs b/src/Infrastructure/BotSharp.Abstraction/Models/AiModel.cs new file mode 100644 index 00000000..348eb457 --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Models/AiModel.cs @@ -0,0 +1,10 @@ +namespace BotSharp.Abstraction.Models; + +public class AiModel +{ + public string Id { get; set; } = string.Empty; + public string Model { get; set; } = string.Empty; + public string Name { get; set; } = string.Empty; + public int MaxLength { get; set; } + public int TokenLimit { get; set; } +} diff --git a/Infrastructure/BotSharp.Core/Accounts/AccountController.cs b/src/Infrastructure/BotSharp.Core/Accounts/AccountController.cs similarity index 100% rename from Infrastructure/BotSharp.Core/Accounts/AccountController.cs rename to src/Infrastructure/BotSharp.Core/Accounts/AccountController.cs diff --git a/Infrastructure/BotSharp.Core/Accounts/AccountCore.cs b/src/Infrastructure/BotSharp.Core/Accounts/AccountCore.cs similarity index 100% rename from Infrastructure/BotSharp.Core/Accounts/AccountCore.cs rename to src/Infrastructure/BotSharp.Core/Accounts/AccountCore.cs diff --git a/Infrastructure/BotSharp.Core/Accounts/AccountDbInitializer.cs b/src/Infrastructure/BotSharp.Core/Accounts/AccountDbInitializer.cs similarity index 100% rename from Infrastructure/BotSharp.Core/Accounts/AccountDbInitializer.cs rename to src/Infrastructure/BotSharp.Core/Accounts/AccountDbInitializer.cs diff --git a/Infrastructure/BotSharp.Core/Accounts/User.cs b/src/Infrastructure/BotSharp.Core/Accounts/User.cs similarity index 100% rename from Infrastructure/BotSharp.Core/Accounts/User.cs rename to src/Infrastructure/BotSharp.Core/Accounts/User.cs diff --git a/Infrastructure/BotSharp.Core/Accounts/UserAuth.cs b/src/Infrastructure/BotSharp.Core/Accounts/UserAuth.cs similarity index 100% rename from Infrastructure/BotSharp.Core/Accounts/UserAuth.cs rename to src/Infrastructure/BotSharp.Core/Accounts/UserAuth.cs diff --git a/Infrastructure/BotSharp.Core/Accounts/VmUser.cs b/src/Infrastructure/BotSharp.Core/Accounts/VmUser.cs similarity index 100% rename from Infrastructure/BotSharp.Core/Accounts/VmUser.cs rename to src/Infrastructure/BotSharp.Core/Accounts/VmUser.cs diff --git a/Infrastructure/BotSharp.Core/Accounts/VmUserLogin.cs b/src/Infrastructure/BotSharp.Core/Accounts/VmUserLogin.cs similarity index 100% rename from Infrastructure/BotSharp.Core/Accounts/VmUserLogin.cs rename to src/Infrastructure/BotSharp.Core/Accounts/VmUserLogin.cs diff --git a/Infrastructure/BotSharp.Core/BotSharp.Core.csproj b/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj similarity index 100% rename from Infrastructure/BotSharp.Core/BotSharp.Core.csproj rename to src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj diff --git a/Infrastructure/BotSharp.Core/BotSharp.Core.csproj.user b/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj.user similarity index 100% rename from Infrastructure/BotSharp.Core/BotSharp.Core.csproj.user rename to src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj.user diff --git a/Infrastructure/BotSharp.Core/CoreController.cs b/src/Infrastructure/BotSharp.Core/CoreController.cs similarity index 100% rename from Infrastructure/BotSharp.Core/CoreController.cs rename to src/Infrastructure/BotSharp.Core/CoreController.cs diff --git a/Channels/BotSharp.Channel.FacebookMessenger/BotSharp.Channel.FacebookMessenger.csproj b/src/Platforms/BotSharp.Platform.AureAi/BotSharp.Platform.AzureAi.csproj similarity index 79% rename from Channels/BotSharp.Channel.FacebookMessenger/BotSharp.Channel.FacebookMessenger.csproj rename to src/Platforms/BotSharp.Platform.AureAi/BotSharp.Platform.AzureAi.csproj index e7f6b42d..6e2feb47 100644 --- a/Channels/BotSharp.Channel.FacebookMessenger/BotSharp.Channel.FacebookMessenger.csproj +++ b/src/Platforms/BotSharp.Platform.AureAi/BotSharp.Platform.AzureAi.csproj @@ -2,6 +2,8 @@ netstandard2.1 + enable + 10 diff --git a/src/Platforms/BotSharp.Platform.Local/BotSharp.Platform.Local.csproj b/src/Platforms/BotSharp.Platform.Local/BotSharp.Platform.Local.csproj new file mode 100644 index 00000000..6e2feb47 --- /dev/null +++ b/src/Platforms/BotSharp.Platform.Local/BotSharp.Platform.Local.csproj @@ -0,0 +1,13 @@ + + + + netstandard2.1 + enable + 10 + + + + + + + diff --git a/Platforms/BotSharp.Platform.OpenAi/BotSharp.Platform.OpenAi.csproj b/src/Platforms/BotSharp.Platform.OpenAi/BotSharp.Platform.OpenAi.csproj similarity index 50% rename from Platforms/BotSharp.Platform.OpenAi/BotSharp.Platform.OpenAi.csproj rename to src/Platforms/BotSharp.Platform.OpenAi/BotSharp.Platform.OpenAi.csproj index 9a596ec2..6e2feb47 100644 --- a/Platforms/BotSharp.Platform.OpenAi/BotSharp.Platform.OpenAi.csproj +++ b/src/Platforms/BotSharp.Platform.OpenAi/BotSharp.Platform.OpenAi.csproj @@ -6,13 +6,6 @@ 10 - - - - - - - diff --git a/src/WebStarter/Controllers/LlmAgentController.cs b/src/WebStarter/Controllers/LlmAgentController.cs new file mode 100644 index 00000000..864c08a9 --- /dev/null +++ b/src/WebStarter/Controllers/LlmAgentController.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Mvc; + +namespace WebStarter.Controllers +{ + [ApiController] + [Route("[controller]")] + public class LlmAgentController : ControllerBase + { + private readonly ILogger _logger; + + public LlmAgentController(ILogger logger) + { + _logger = logger; + } + } +} \ No newline at end of file diff --git a/src/WebStarter/Program.cs b/src/WebStarter/Program.cs new file mode 100644 index 00000000..1fc4133a --- /dev/null +++ b/src/WebStarter/Program.cs @@ -0,0 +1,28 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +builder.Services.AddHttpContextAccessor(); + +// Streaming response to Redis +// var multiplexer = ConnectionMultiplexer.Connect("192.168.0.26:6379"); +// builder.Services.AddSingleton(multiplexer); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/src/WebStarter/Properties/launchSettings.json b/src/WebStarter/Properties/launchSettings.json new file mode 100644 index 00000000..80a9cf62 --- /dev/null +++ b/src/WebStarter/Properties/launchSettings.json @@ -0,0 +1,30 @@ +{ + "profiles": { + "WebStarter": { + "commandName": "Project", + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:5500" + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + }, + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:31769", + "sslPort": 0 + } + } +} \ No newline at end of file diff --git a/src/WebStarter/WebStarter.csproj b/src/WebStarter/WebStarter.csproj new file mode 100644 index 00000000..988b1b04 --- /dev/null +++ b/src/WebStarter/WebStarter.csproj @@ -0,0 +1,21 @@ + + + + net6.0 + enable + enable + 4fb8c9df-7975-4926-ba73-46c8ca440691 + + + + + + + + + + + + + + diff --git a/src/WebStarter/appsettings.Development.json b/src/WebStarter/appsettings.Development.json new file mode 100644 index 00000000..0c208ae9 --- /dev/null +++ b/src/WebStarter/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/src/WebStarter/appsettings.json b/src/WebStarter/appsettings.json new file mode 100644 index 00000000..ea367faa --- /dev/null +++ b/src/WebStarter/appsettings.json @@ -0,0 +1,14 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + + "OpenAi": { + "userName": "", + "password": "" + } +}