Skip to content

Commit 2b6c235

Browse files
committed
Add pizza bot router.
1 parent 2445cb3 commit 2b6c235

23 files changed

Lines changed: 94 additions & 61 deletions

File tree

‎README.md‎

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

104104
#### Tools
105105
- BotSharp.Plugin.RoutingSpeeder
106+
- BotSharp.Plugin.WebDriver
106107
- BotSharp.Plugin.PizzaBot
107108

108109
#### UIs
-17.4 KB
Loading

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ public class Agent
6262

6363
public bool IsPublic { get; set; }
6464

65-
[JsonIgnore]
66-
public bool IsHost { get; set; }
67-
6865
[JsonIgnore]
6966
public PluginDef Plugin { get; set; }
7067

‎src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,12 @@ public async Task<PagedItems<Agent>> GetAgents(AgentFilter filter)
1313
{
1414
var agents = _db.GetAgents(filter);
1515

16-
// Set IsRouter
1716
var routeSetting = _services.GetRequiredService<RoutingSettings>();
1817
foreach (var agent in agents)
1918
{
2019
agent.Plugin = GetPlugin(agent.Id);
2120
}
2221

23-
// Set IsHost
24-
var agentSetting = _services.GetRequiredService<AgentSettings>();
25-
foreach (var agent in agents)
26-
{
27-
agent.IsHost = agentSetting.HostAgentId == agent.Id;
28-
}
29-
3022
agents = agents.Where(x => x.Installed).ToList();
3123
var pager = filter?.Pager ?? new Pagination();
3224
return new PagedItems<Agent>

‎src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj‎

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

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
@@ -55,6 +55,10 @@
5555
<None Remove="data\agents\01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a\templates\planner_prompt.sequential.liquid" />
5656
<None Remove="data\agents\01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a\templates\response_with_function.liquid" />
5757
<None Remove="data\agents\01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a\templates\welcome.liquid" />
58+
<None Remove="data\agents\dfd9b46d-d00c-40af-8a75-3fbdc2b89869\agent.json" />
59+
<None Remove="data\agents\dfd9b46d-d00c-40af-8a75-3fbdc2b89869\instruction.liquid" />
60+
<None Remove="data\agents\dfd9b46d-d00c-40af-8a75-3fbdc2b89869\templates\instruction.executor.liquid" />
61+
<None Remove="data\agents\dfd9b46d-d00c-40af-8a75-3fbdc2b89869\templates\instruction.reviewer.liquid" />
5862
<None Remove="data\plugins\config.json" />
5963
</ItemGroup>
6064

@@ -86,6 +90,18 @@
8690
<Content Include="data\agents\01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a\templates\welcome.liquid">
8791
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
8892
</Content>
93+
<Content Include="data\agents\dfd9b46d-d00c-40af-8a75-3fbdc2b89869\agent.json">
94+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
95+
</Content>
96+
<Content Include="data\agents\dfd9b46d-d00c-40af-8a75-3fbdc2b89869\instruction.liquid">
97+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
98+
</Content>
99+
<Content Include="data\agents\dfd9b46d-d00c-40af-8a75-3fbdc2b89869\templates\instruction.executor.liquid">
100+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
101+
</Content>
102+
<Content Include="data\agents\dfd9b46d-d00c-40af-8a75-3fbdc2b89869\templates\instruction.reviewer.liquid">
103+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
104+
</Content>
89105
<Content Include="data\plugins\config.json">
90106
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
91107
</Content>

‎src/Infrastructure/BotSharp.Core/data/agents/01e2fc5c-2c89-4ec7-8470-7688608b496c/agent.json‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"type": "task",
66
"createdDateTime": "2024-01-15T10:39:32Z",
77
"updatedDateTime": "2024-01-15T14:39:32Z",
8-
"iconUrl": "/images/users/bot.png",
8+
"iconUrl": "/images/logo.png",
99
"disabled": false,
10-
"isPublic": true,
11-
"profiles": [ "standalone" ]
10+
"isPublic": true
1211
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"id": "dfd9b46d-d00c-40af-8a75-3fbdc2b89869",
3+
"name": "Evaluator",
4+
"description": "Evaluate the performance of the LLM agents",
5+
"createdDateTime": "2023-08-18T00:00:00Z",
6+
"updatedDateTime": "2023-08-18T00:00:00Z",
7+
"disabled": true,
8+
"llmConfig": {
9+
"model": "gpt-35-turbo-instruct"
10+
}
11+
}

tests/BotSharp.Plugin.PizzaBot/data/agents/dfd9b46d-d00c-40af-8a75-3fbdc2b89869/instruction.liquid renamed to src/Infrastructure/BotSharp.Core/data/agents/dfd9b46d-d00c-40af-8a75-3fbdc2b89869/instruction.liquid

File renamed without changes.

tests/BotSharp.Plugin.PizzaBot/data/agents/dfd9b46d-d00c-40af-8a75-3fbdc2b89869/templates/instruction.executor.liquid renamed to src/Infrastructure/BotSharp.Core/data/agents/dfd9b46d-d00c-40af-8a75-3fbdc2b89869/templates/instruction.executor.liquid

File renamed without changes.

tests/BotSharp.Plugin.PizzaBot/data/agents/dfd9b46d-d00c-40af-8a75-3fbdc2b89869/templates/instruction.reviewer.liquid renamed to src/Infrastructure/BotSharp.Core/data/agents/dfd9b46d-d00c-40af-8a75-3fbdc2b89869/templates/instruction.reviewer.liquid

File renamed without changes.

0 commit comments

Comments
 (0)