Skip to content

Commit 14f2570

Browse files
authored
Merge pull request #295 from SciSharp/dotnet8
merge latest
2 parents 4d5ebd8 + 1518def commit 14f2570

File tree

107 files changed

+2293
-323
lines changed

Some content is hidden

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

107 files changed

+2293
-323
lines changed

Directory.Build.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project>
2-
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
4-
<LangVersion>10.0</LangVersion>
5-
<BotSharpVersion>0.22.0</BotSharpVersion>
6-
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
7-
<GenerateDocumentationFile>false</GenerateDocumentationFile>
8-
</PropertyGroup>
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<LangVersion>10.0</LangVersion>
5+
<BotSharpVersion>0.22.0</BotSharpVersion>
6+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
7+
<GenerateDocumentationFile>false</GenerateDocumentationFile>
8+
</PropertyGroup>
99
</Project>

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ BotSharp uses component design, the kernel is kept to a minimum, and business fu
102102
- BotSharp.Plugin.PaddleSharp
103103

104104
#### Tools
105+
- BotSharp.Plugin.Dashboard
105106
- BotSharp.Plugin.RoutingSpeeder
106107
- BotSharp.Plugin.WebDriver
107108
- BotSharp.Plugin.PizzaBot

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@
5656

5757
# General information about the project.
5858
project = 'BotSharp'
59-
copyright = 'Since 2018, Haiping Chen'
59+
copyright = 'Since 2018, SciSharp STACK'
6060
author = 'Haiping Chen'
6161

6262
# The version info for the project you're documenting, acts as replacement for
6363
# |version| and |release|, also used in various other places throughout the
6464
# built documents.
6565
#
6666
# The short X.Y version.
67-
version = '0.21'
67+
version = '0.23'
6868
# The full version, including alpha/beta/rc tags.
69-
release = '0.21.0'
69+
release = '0.23.0'
7070

7171
# The language for content autogenerated by Sphinx. Refer to documentation
7272
# for a list of supported languages.

src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentField.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@ public enum AgentField
1818
Sample,
1919
LlmConfig
2020
}
21+
22+
public enum AgentTaskField
23+
{
24+
All = 1,
25+
Name,
26+
Description,
27+
Enabled,
28+
Content,
29+
DirectAgentId
30+
}

src/Infrastructure/BotSharp.Abstraction/Agents/Models/Agent.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using BotSharp.Abstraction.Functions.Models;
22
using BotSharp.Abstraction.Plugins.Models;
33
using BotSharp.Abstraction.Routing.Models;
4+
using BotSharp.Abstraction.Tasks.Models;
45

56
namespace BotSharp.Abstraction.Agents.Models;
67

@@ -36,6 +37,13 @@ public class Agent
3637
public List<AgentTemplate> Templates { get; set; }
3738
= new List<AgentTemplate>();
3839

40+
/// <summary>
41+
/// Agent tasks
42+
/// </summary>
43+
[JsonIgnore]
44+
public List<AgentTask> Tasks { get; set; }
45+
= new List<AgentTask>();
46+
3947
/// <summary>
4048
/// Samples
4149
/// </summary>
@@ -136,6 +144,12 @@ public Agent SetTemplates(List<AgentTemplate> templates)
136144
return this;
137145
}
138146

147+
public Agent SetTasks(List<AgentTask> tasks)
148+
{
149+
Tasks = tasks ?? new List<AgentTask>();
150+
return this;
151+
}
152+
139153
public Agent SetFunctions(List<FunctionDef> functions)
140154
{
141155
Functions = functions ?? new List<FunctionDef>();

src/Infrastructure/BotSharp.Abstraction/Conversations/ConversationHookBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ public virtual Task OnStateChanged(string name, string preValue, string currentV
3636
return Task.CompletedTask;
3737
}
3838

39+
public virtual Task OnDialogRecordLoaded(RoleDialogModel dialog)
40+
{
41+
return Task.CompletedTask;
42+
}
43+
3944
public virtual Task OnDialogsLoaded(List<RoleDialogModel> dialogs)
4045
{
4146
_dialogs = dialogs;

src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationHook.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ public interface IConversationHook
3232
/// <returns></returns>
3333
Task OnDialogsLoaded(List<RoleDialogModel> dialogs);
3434

35+
/// <summary>
36+
/// Triggered when every dialog record is loaded
37+
/// It can be used to populate extra data point before presenting to user.
38+
/// </summary>
39+
/// <param name="dialog"></param>
40+
/// <returns></returns>
41+
Task OnDialogRecordLoaded(RoleDialogModel dialog);
42+
3543
Task OnStateLoaded(ConversationState state);
3644
Task OnStateChanged(string name, string preValue, string currentValue);
3745

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public class FunctionCallFromLlm : RoutingArgs
1515
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
1616
public bool ExecutingDirectly { get; set; }
1717

18+
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
19+
public bool HideDialogContext { get; set; }
20+
1821
/// <summary>
1922
/// Router routed to a wrong agent.
2023
/// Set this flag as True will force router to re-route current request to a new agent.

src/Infrastructure/BotSharp.Abstraction/MLTasks/ILlmProviderService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ public interface ILlmProviderService
66
{
77
LlmModelSetting GetSetting(string provider, string model);
88
List<string> GetProviders();
9+
LlmModelSetting GetProviderModel(string provider, string id);
910
List<LlmModelSetting> GetProviderModels(string provider);
1011
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace BotSharp.Abstraction.Repositories.Filters;
2+
3+
public class AgentTaskFilter
4+
{
5+
public Pagination Pager { get; set; } = new Pagination();
6+
public string? AgentId { get; set; }
7+
public bool? Enabled { get; set; }
8+
}

0 commit comments

Comments
 (0)