Skip to content

Commit 83e3c38

Browse files
authored
Merge branch 'master' into sk/text-completion
2 parents 19df4da + f12f6c6 commit 83e3c38

30 files changed

+388
-40
lines changed

BotSharp.sln

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.SemanticKer
6767
EndProject
6868
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.SemanticKernel.UnitTests", "tests\BotSharp.Plugin.SemanticKernel.UnitTests\BotSharp.Plugin.SemanticKernel.UnitTests.csproj", "{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}"
6969
EndProject
70+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.Twilio", "src\Plugins\BotSharp.Plugin.Twilio\BotSharp.Plugin.Twilio.csproj", "{E627F1E3-BE03-443A-83A2-86A855A278EB}"
71+
EndProject
7072
Global
7173
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7274
Debug|Any CPU = Debug|Any CPU
@@ -243,6 +245,14 @@ Global
243245
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|Any CPU.Build.0 = Release|Any CPU
244246
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|x64.ActiveCfg = Release|Any CPU
245247
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247}.Release|x64.Build.0 = Release|Any CPU
248+
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
249+
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
250+
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|x64.ActiveCfg = Debug|Any CPU
251+
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Debug|x64.Build.0 = Debug|Any CPU
252+
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
253+
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|Any CPU.Build.0 = Release|Any CPU
254+
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|x64.ActiveCfg = Release|Any CPU
255+
{E627F1E3-BE03-443A-83A2-86A855A278EB}.Release|x64.Build.0 = Release|Any CPU
246256
EndGlobalSection
247257
GlobalSection(SolutionProperties) = preSolution
248258
HideSolutionNode = FALSE
@@ -276,6 +286,7 @@ Global
276286
{8BC29F8A-78D6-422C-B522-10687ADC38ED} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
277287
{73EE2CD0-3B27-4F02-A67B-762CBDD740D0} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
278288
{BC57D428-A1A4-4D38-A2D0-AC6CA943F247} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
289+
{E627F1E3-BE03-443A-83A2-86A855A278EB} = {64264688-0F5C-4AB0-8F2B-B59B717CCE00}
279290
EndGlobalSection
280291
GlobalSection(ExtensibilityGlobals) = postSolution
281292
SolutionGuid = {A9969D89-C98B-40A5-A12B-FC87E55B3A19}

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ It's written in C# running on .Net Core that is full cross-platform framework, t
2424
* Built-in multi-agents and conversation with state management.
2525
* Support multiple LLM Planning approaches to handle different tasks.
2626
* Built-in RAG related interfaces, Memeory based vector searching.
27-
* Support multiple LLM platforms (ChatGPT 3.5 / 4.0, PaLM 2, LLaMA 2).
27+
* Support multiple LLM platforms (ChatGPT 3.5 / 4.0, PaLM 2, LLaMA 2, HuggingFace).
2828
* Allow multiple agents with different responsibilities cooperate to complete complex tasks.
2929
* Build, test, evaluate and audit your LLM agent in one place.
3030
* Support different open source UI [Chatbot UI](src/Plugins/BotSharp.Plugin.ChatbotUI/Chatbot-UI.md), [HuggingChat UI](src/Plugins/BotSharp.Plugin.HuggingFace/HuggingChat-UI.md).
@@ -39,14 +39,39 @@ It's written in C# running on .Net Core that is full cross-platform framework, t
3939
```
4040
2. Run UI project, reference to [Chatbot UI](src/Plugins/BotSharp.Plugin.ChatbotUI/Chatbot-UI.md).
4141

42-
### Extension Libraries
42+
### Plugins
4343

44-
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.
44+
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. Below are the bulit-in plugins:
4545

46-
* Chatbot UI connector.
47-
* A channel module of BotSharp for Facebook Messenger.
48-
* A channel module of BotSharp for Tencent Wechat.
49-
* A channel module of BotSharp for Telegram.
46+
#### Data Storages
47+
- BotSharp.Plugin.MongoStorage
48+
49+
#### LLMs
50+
- BotSharp.Plugin.AzureOpenAI
51+
- BotSharp.Plugin.GoogleAI
52+
- BotSharp.Plugin.MetaAI
53+
- BotSharp.Plugin.HuggingFace
54+
- BotSharp.Plugin.LLamaSharp
55+
56+
#### Messaging / Channel
57+
- BotSharp.OpenAPI
58+
- BotSharp.Plugin.MetaMessenger
59+
- BotSharp.Plugin.Twilio
60+
- BotSharp.Plugin.WeChat
61+
62+
#### RAGS
63+
- BotSharp.Plugin.KnowledgeBase
64+
- BotSharp.Plugin.Qdrant
65+
66+
#### Visions
67+
- BotSharp.Plugin.PaddleSharp
68+
69+
#### Tools
70+
- BotSharp.Plugin.RoutingSpeeder
71+
- BotSharp.Plugin.PizzaBot
72+
73+
#### UIs
74+
- BotSharp.Plugin.ChatbotUI
5075

5176
### Documents
5277

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace BotSharp.Abstraction.Conversations;
2+
3+
public interface IConversationAttachmentService
4+
{
5+
string GetDirectory(string conversationId);
6+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
namespace BotSharp.Abstraction.Conversations.Models;
2+
3+
public class Attachment
4+
{
5+
public string ContentType { get; set; }
6+
7+
//
8+
// Summary:
9+
// Gets the raw Content-Disposition header of the uploaded file.
10+
public string ContentDisposition { get; set; }
11+
12+
//
13+
// Summary:
14+
// Gets the file length in bytes.
15+
public long Length { get; set; }
16+
17+
//
18+
// Summary:
19+
// Gets the file name from the Content-Disposition header.
20+
public string FileName { get; set; }
21+
}

src/Infrastructure/BotSharp.Abstraction/Conversations/Models/RoleDialogModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using BotSharp.Abstraction.Functions.Models;
2+
using BotSharp.Abstraction.Messaging.Models;
3+
using BotSharp.Abstraction.Messaging.Models.RichContent;
24

35
namespace BotSharp.Abstraction.Conversations.Models;
46

@@ -35,7 +37,7 @@ public class RoleDialogModel : ITrackableMessage
3537
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
3638
public object Data { get; set; }
3739
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
38-
public object? RichContent { get; set; }
40+
public RichContent<IMessageTemplate>? RichContent { get; set; }
3941

4042
/// <summary>
4143
/// Stop conversation completion

src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionCallFromLlm.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public class FunctionCallFromLlm : RoutingArgs
1212
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
1313
public JsonDocument? Arguments { get; set; }
1414

15+
public bool IsExecutionOnce { get; set; }
16+
1517
public override string ToString()
1618
{
1719
var route = string.IsNullOrEmpty(AgentName) ? "" : $"<Route to {AgentName.ToUpper()} because {Reason}>";
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace BotSharp.Abstraction.Messaging.Models;
2+
3+
public interface IMessageTemplate
4+
{
5+
string Text { get; set; }
6+
}

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public class QuickReplyElement
99
public string? Payload { get; set; }
1010
[JsonPropertyName("image_url")]
1111
public string? ImageUrl { get; set; }
12-
[JsonPropertyName("postback_url")]
1312
public string? PostBackUrl { get; set; }
1413
}
1514
}

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyMessage.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11

22
namespace BotSharp.Abstraction.Messaging.Models.RichContent
33
{
4-
public class QuickReplyMessage : TextMessage
4+
public class QuickReplyMessage : IMessageTemplate
55
{
6+
public string Text { get; set; } = string.Empty;
7+
68
[JsonPropertyName("quick_replies")]
79
public List<QuickReplyElement> QuickReplies { get; set; } = new List<QuickReplyElement>();
810
}

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/RichContent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace BotSharp.Abstraction.Messaging.Models.RichContent
22
{
3-
public class RichContent<T>
3+
public class RichContent<T> where T : IMessageTemplate
44
{
55
public Recipient Recipient { get; set; } = new Recipient();
66
/// <summary>

0 commit comments

Comments
 (0)