Add disabled property to routing table.
This commit is contained in:
parent
7e95be00ef
commit
e4d8524376
|
|
@ -19,6 +19,9 @@ public class RoutingRecord
|
|||
[JsonPropertyName("redirect_to")]
|
||||
public string RedirectTo { get; set; }
|
||||
|
||||
[JsonPropertyName("disabled")]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
|
|
|
|||
|
|
@ -82,4 +82,8 @@
|
|||
<ProjectReference Include="..\BotSharp.Abstraction\BotSharp.Abstraction.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Reasoning\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ public class AgentHook : AgentHookBase
|
|||
public override bool OnInstructionLoaded(string template, Dictionary<string, object> dict)
|
||||
{
|
||||
var router = _services.GetRequiredService<IAgentRouting>();
|
||||
dict["routing_records"] = router.GetRoutingRecords();
|
||||
dict["routing_records"] = router.GetRoutingRecords()
|
||||
.Where(x => !x.Disabled)
|
||||
.ToList();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue