Fix ExecuteOnce fetch dialogs.
This commit is contained in:
parent
dbd1b8d0ce
commit
0bf2fe58fc
|
|
@ -12,5 +12,12 @@ public interface IRoutingService
|
|||
void ResetRecursiveCounter();
|
||||
Task<bool> InvokeAgent(string agentId, List<RoleDialogModel> dialogs);
|
||||
Task<RoleDialogModel> InstructLoop(RoleDialogModel message);
|
||||
|
||||
/// <summary>
|
||||
/// Talk to a specific Agent directly, bypassing the Router
|
||||
/// </summary>
|
||||
/// <param name="agent"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <returns></returns>
|
||||
Task<RoleDialogModel> ExecuteOnce(Agent agent, RoleDialogModel message);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ public partial class RoutingService : IRoutingService
|
|||
var handlers = _services.GetServices<IRoutingHandler>();
|
||||
|
||||
var handler = handlers.FirstOrDefault(x => x.Name == "route_to_agent");
|
||||
var dialogs = new List<RoleDialogModel> { message };
|
||||
|
||||
var conv = _services.GetRequiredService<IConversationService>();
|
||||
var dialogs = conv.GetDialogHistory();
|
||||
handler.SetDialogs(dialogs);
|
||||
|
||||
var inst = new FunctionCallFromLlm
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ namespace BotSharp.Plugin.PizzaBot;
|
|||
public class PizzaBotPlugin : IBotSharpPlugin
|
||||
{
|
||||
public string Name => "Pizza AI Assistant";
|
||||
public string Description => "An example of an enterprise-grade AI Chatbot.";
|
||||
|
||||
public void RegisterDI(IServiceCollection services, IConfiguration config)
|
||||
{
|
||||
// Register hooks
|
||||
|
|
|
|||
Loading…
Reference in a new issue