Merge pull request #638 from yileicn/master

optimize indication
This commit is contained in:
Haiping 2024-09-13 12:35:03 -05:00 committed by GitHub
commit e968627f9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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);