Skip to content

Commit 34fa7d8

Browse files
Bo YinBo Yin
authored andcommitted
Merge branch 'master' into feature/twiliocallutility
2 parents 7f7bd80 + b01acea commit 34fa7d8

File tree

82 files changed

+1685
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1685
-276
lines changed

BotSharp.sln

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.Graph", "sr
117117
EndProject
118118
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.AudioHandler", "src\Plugins\BotSharp.Plugin.AudioHandler\BotSharp.Plugin.AudioHandler.csproj", "{F57F4862-F8D4-44A1-AC12-5C131B5C9785}"
119119
EndProject
120-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Core.SideCar", "src\Infrastructure\BotSharp.Core.SideCar\BotSharp.Core.SideCar.csproj", "{6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}"
120+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Core.SideCar", "src\Infrastructure\BotSharp.Core.SideCar\BotSharp.Core.SideCar.csproj", "{6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}"
121+
EndProject
122+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotSharp.Plugin.VertexAI", "src\Plugins\BotSharp.Plugin.LangChain\BotSharp.Plugin.VertexAI.csproj", "{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}"
121123
EndProject
122124
Global
123125
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -479,6 +481,14 @@ Global
479481
{6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|Any CPU.Build.0 = Release|Any CPU
480482
{6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|x64.ActiveCfg = Release|Any CPU
481483
{6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE}.Release|x64.Build.0 = Release|Any CPU
484+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
485+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|Any CPU.Build.0 = Debug|Any CPU
486+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|x64.ActiveCfg = Debug|Any CPU
487+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Debug|x64.Build.0 = Debug|Any CPU
488+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|Any CPU.ActiveCfg = Release|Any CPU
489+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|Any CPU.Build.0 = Release|Any CPU
490+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|x64.ActiveCfg = Release|Any CPU
491+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B}.Release|x64.Build.0 = Release|Any CPU
482492
EndGlobalSection
483493
GlobalSection(SolutionProperties) = preSolution
484494
HideSolutionNode = FALSE
@@ -536,6 +546,7 @@ Global
536546
{EBFE97DA-D0BA-48BA-8B5D-083B60348D1D} = {97A0B191-64D7-4F8A-BFE8-1BFCC5E247E1}
537547
{F57F4862-F8D4-44A1-AC12-5C131B5C9785} = {51AFE054-AE99-497D-A593-69BAEFB5106F}
538548
{6D3A54F9-4792-41DB-BE7D-4F7B1D918EAE} = {E29DC6C4-5E57-48C5-BCB0-6B8F84782749}
549+
{7DA2DCD0-551B-432E-AA5C-22DDD3ED459B} = {D5293208-2BEF-42FC-A64C-5954F61720BA}
539550
EndGlobalSection
540551
GlobalSection(ExtensibilityGlobals) = postSolution
541552
SolutionGuid = {A9969D89-C98B-40A5-A12B-FC87E55B3A19}

src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public interface IWebBrowser
1212
Task<BrowserActionResult> ActionOnElement(MessageInfo message, ElementLocatingArgs location, ElementActionArgs action);
1313
Task<BrowserActionResult> LocateElement(MessageInfo message, ElementLocatingArgs location);
1414
Task DoAction(MessageInfo message, ElementActionArgs action, BrowserActionResult result);
15+
Task PressKey(MessageInfo message, string key);
1516

1617
Task<BrowserActionResult> InputUserText(BrowserActionParams actionParams);
1718
Task<BrowserActionResult> InputUserPassword(BrowserActionParams actionParams);

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementActionArgs.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public class ElementActionArgs
1212

1313
public ElementPosition? Position { get; set; }
1414

15+
/// <summary>
16+
/// Delay milliseconds before pressing key
17+
/// </summary>
18+
public int DelayBeforePressingKey { get; set; }
1519
public string? PressKey { get; set; }
1620

1721
/// <summary>

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ public class PageActionArgs
3838
public bool ResponseInMemory { get; set; } = false;
3939
public List<WebPageResponseData>? ResponseContainer { get; set; }
4040

41-
public bool UseExistingPage { get; set; } = false;
42-
4341
public bool WaitForNetworkIdle { get; set; } = true;
4442
public float? Timeout { get; set; }
4543

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace BotSharp.Abstraction.Infrastructures.Events;
2+
3+
public interface IEventPublisher
4+
{
5+
/// <summary>
6+
/// Boardcast message to all subscribers
7+
/// </summary>
8+
/// <param name="channel"></param>
9+
/// <param name="message"></param>
10+
/// <returns></returns>
11+
Task BroadcastAsync(string channel, string message);
12+
13+
Task PublishAsync(string channel, string message);
14+
15+
Task ReDispatchAsync(string channel, int count = 10, string order = "asc");
16+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace BotSharp.Abstraction.Infrastructures.Events;
2+
3+
public interface IEventSubscriber
4+
{
5+
Task SubscribeAsync(string channel, Func<string, string, Task> received);
6+
7+
Task SubscribeAsync(string channel, string group, Func<string, string, Task> received);
8+
}

src/Infrastructure/BotSharp.Abstraction/Knowledges/IKnowledgeService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface IKnowledgeService
3030
/// <param name="collectionName"></param>
3131
/// <param name="files"></param>
3232
/// <returns></returns>
33-
Task<UploadKnowledgeResponse> UploadDocumentsToKnowledge(string collectionName, IEnumerable<ExternalFileModel> files);
33+
Task<UploadKnowledgeResponse> UploadDocumentsToKnowledge(string collectionName, IEnumerable<ExternalFileModel> files, ChunkOption? option = null);
3434
/// <summary>
3535
/// Save document content to knowledgebase without saving the document
3636
/// </summary>

src/Infrastructure/BotSharp.Abstraction/Knowledges/Models/ChunkOption.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,15 @@ public class ChunkOption
1313
public int Conjunction { get; set; }
1414

1515
public bool SplitByWord { get; set; }
16+
17+
18+
public static ChunkOption Default()
19+
{
20+
return new ChunkOption
21+
{
22+
Size = 1024,
23+
Conjunction = 12,
24+
SplitByWord = true,
25+
};
26+
}
1627
}

src/Infrastructure/BotSharp.Abstraction/Plugins/Models/PluginFilter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ public class PluginFilter
44
{
55
public Pagination Pager { get; set; } = new Pagination();
66
public IEnumerable<string>? Names { get; set; }
7+
public string? SimilarName { get; set; }
78
}
89
}

src/Infrastructure/BotSharp.Abstraction/Repositories/Filters/AgentFilter.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ public class AgentFilter
44
{
55
public Pagination Pager { get; set; } = new Pagination();
66
public string? AgentName { get; set; }
7+
public string? SimilarName { get; set; }
78
public bool? Disabled { get; set; }
89
public bool? Installed { get; set; }
910
public string? Type { get; set; }
1011
public bool? IsPublic { get; set; }
1112
public List<string>? AgentIds { get; set; }
13+
14+
public static AgentFilter Empty()
15+
{
16+
return new AgentFilter();
17+
}
1218
}

0 commit comments

Comments
 (0)