optimize indication

This commit is contained in:
LAPTOP-3CFGGVOS\rabbit 2024-09-13 20:21:03 +08:00
parent 504bfd24b2
commit 829d0c6e4e
2 changed files with 3 additions and 1 deletions

View file

@ -9,5 +9,7 @@ public interface IFunctionCallback
/// </summary>
string Indication => string.Empty;
Task<string> GetIndication(RoleDialogModel message) => Task.FromResult(Indication);
Task<bool> Execute(RoleDialogModel message);
}

View file

@ -25,7 +25,7 @@ public partial class RoutingService
var progressService = _services.GetService<IConversationProgressService>();
// Before executing functions
clonedMessage.Indication = function.Indication;
clonedMessage.Indication = await function.GetIndication(message);
if (progressService?.OnFunctionExecuting != null)
{
await progressService.OnFunctionExecuting(clonedMessage);