shortened timeout in conversation broker
This commit is contained in:
@@ -4,6 +4,8 @@ namespace Jibo.Cloud.Application.Services;
|
|||||||
|
|
||||||
public sealed class DemoConversationBroker(JiboInteractionService interactionService) : IConversationBroker
|
public sealed class DemoConversationBroker(JiboInteractionService interactionService) : IConversationBroker
|
||||||
{
|
{
|
||||||
|
private readonly TimeSpan _followUpTimeout = TimeSpan.FromSeconds(6);
|
||||||
|
|
||||||
public async Task<ResponsePlan> HandleTurnAsync(TurnContext turn, CancellationToken cancellationToken = default)
|
public async Task<ResponsePlan> HandleTurnAsync(TurnContext turn, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
var decision = await interactionService.BuildDecisionAsync(turn, cancellationToken);
|
var decision = await interactionService.BuildDecisionAsync(turn, cancellationToken);
|
||||||
@@ -31,7 +33,7 @@ public sealed class DemoConversationBroker(JiboInteractionService interactionSer
|
|||||||
? new FollowUpPolicy
|
? new FollowUpPolicy
|
||||||
{
|
{
|
||||||
KeepMicOpen = true,
|
KeepMicOpen = true,
|
||||||
Timeout = TimeSpan.FromSeconds(12),
|
Timeout = _followUpTimeout,
|
||||||
ExpectedTopic = "conversation"
|
ExpectedTopic = "conversation"
|
||||||
}
|
}
|
||||||
: FollowUpPolicy.None,
|
: FollowUpPolicy.None,
|
||||||
@@ -51,7 +53,7 @@ public sealed class DemoConversationBroker(JiboInteractionService interactionSer
|
|||||||
plan.Actions.Add(new ListenAction
|
plan.Actions.Add(new ListenAction
|
||||||
{
|
{
|
||||||
Sequence = 1,
|
Sequence = 1,
|
||||||
Timeout = TimeSpan.FromSeconds(12),
|
Timeout = _followUpTimeout,
|
||||||
Mode = "follow-up"
|
Mode = "follow-up"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user