Skip to content

Commit 44f01f1

Browse files
author
Haiping Chen
committed
Add phone state for OutboundPhoneCallFn
1 parent da14d00 commit 44f01f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Plugins/BotSharp.Plugin.Twilio/OutboundPhoneCallHandler/Functions/OutboundPhoneCallFn.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,25 @@ private async Task ForkConversation(LlmContextIn args,
145145
Title = args.InitialMessage
146146
});
147147

148+
var messageId = Guid.NewGuid().ToString();
148149
convStorage.Append(newConversationId, new List<RoleDialogModel>
149150
{
150151
new RoleDialogModel(AgentRole.User, "Hi")
151152
{
153+
MessageId = messageId,
152154
CurrentAgentId = entryAgentId
153155
},
154156
new RoleDialogModel(AgentRole.Assistant, args.InitialMessage)
155157
{
158+
MessageId = messageId,
156159
CurrentAgentId = entryAgentId
157160
}
158161
});
159162

160163
convService.SetConversationId(newConversationId,
161164
[
162165
new MessageState(StateConst.ORIGIN_CONVERSATION_ID, originConversationId),
166+
new MessageState("channel", "phone"),
163167
new MessageState("phone_from", call.From),
164168
new MessageState("phone_direction", call.Direction),
165169
new MessageState("phone_number", call.To),

0 commit comments

Comments
 (0)