Add WaitTime to ElementActionArgs
This commit is contained in:
parent
b8f6f53797
commit
feb0a04571
|
|
@ -12,6 +12,11 @@ public class ElementActionArgs
|
|||
|
||||
public string? PressKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Wait time in seconds
|
||||
/// </summary>
|
||||
public int WaitTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required for deserialization
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public interface IConversationService
|
|||
Func<RoleDialogModel, Task> onFunctionExecuting,
|
||||
Func<RoleDialogModel, Task> onFunctionExecuted);
|
||||
|
||||
List<RoleDialogModel> GetDialogHistory(int lastCount = 50, bool fromBreakpoint = true);
|
||||
List<RoleDialogModel> GetDialogHistory(int lastCount = 100, bool fromBreakpoint = true);
|
||||
Task CleanHistory(string agentId);
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public interface IRoutingService
|
|||
/// <returns></returns>
|
||||
Task<RoleDialogModel> InstructDirect(Agent agent, RoleDialogModel message);
|
||||
|
||||
Task<string> GetConversationContent(List<RoleDialogModel> dialogs, int maxDialogCount = 50);
|
||||
Task<string> GetConversationContent(List<RoleDialogModel> dialogs, int maxDialogCount = 100);
|
||||
|
||||
(bool, string) HasMissingRequiredField(RoleDialogModel message, out string agentId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public partial class ConversationService
|
|||
return response.Content;
|
||||
}
|
||||
|
||||
private string GetConversationContent(List<RoleDialogModel> dialogs, int maxDialogCount = 50)
|
||||
private string GetConversationContent(List<RoleDialogModel> dialogs, int maxDialogCount = 100)
|
||||
{
|
||||
var conversation = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public partial class ConversationService : IConversationService
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<RoleDialogModel> GetDialogHistory(int lastCount = 50, bool fromBreakpoint = true)
|
||||
public List<RoleDialogModel> GetDialogHistory(int lastCount = 100, bool fromBreakpoint = true)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_conversationId))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ namespace BotSharp.Core.Routing;
|
|||
|
||||
public partial class RoutingService
|
||||
{
|
||||
public async Task<string> GetConversationContent(List<RoleDialogModel> dialogs, int maxDialogCount = 50)
|
||||
public async Task<string> GetConversationContent(List<RoleDialogModel> dialogs, int maxDialogCount = 100)
|
||||
{
|
||||
var agentService = _services.GetRequiredService<IAgentService>();
|
||||
var conversation = "";
|
||||
|
|
|
|||
|
|
@ -58,5 +58,10 @@ public partial class PlaywrightWebDriver
|
|||
{
|
||||
await locator.HoverAsync();
|
||||
}
|
||||
|
||||
if (action.WaitTime > 0)
|
||||
{
|
||||
await Task.Delay(1000 * action.WaitTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue