Add phone state for OutboundPhoneCallFn

This commit is contained in:
Haiping Chen 2025-04-01 12:43:00 -05:00
parent da14d000fa
commit 44f01f1158

View file

@ -145,14 +145,17 @@ public class OutboundPhoneCallFn : IFunctionCallback
Title = args.InitialMessage
});
var messageId = Guid.NewGuid().ToString();
convStorage.Append(newConversationId, new List<RoleDialogModel>
{
new RoleDialogModel(AgentRole.User, "Hi")
{
MessageId = messageId,
CurrentAgentId = entryAgentId
},
new RoleDialogModel(AgentRole.Assistant, args.InitialMessage)
{
MessageId = messageId,
CurrentAgentId = entryAgentId
}
});
@ -160,6 +163,7 @@ public class OutboundPhoneCallFn : IFunctionCallback
convService.SetConversationId(newConversationId,
[
new MessageState(StateConst.ORIGIN_CONVERSATION_ID, originConversationId),
new MessageState("channel", "phone"),
new MessageState("phone_from", call.From),
new MessageState("phone_direction", call.Direction),
new MessageState("phone_number", call.To),