Support AgentId for twilio stream
This commit is contained in:
parent
32c1876f04
commit
419b4717d6
|
|
@ -85,7 +85,7 @@ public class TwilioStreamController : TwilioController
|
|||
{
|
||||
var conv = new Conversation
|
||||
{
|
||||
AgentId = _settings.AgentId,
|
||||
AgentId = request.AgentId ?? _settings.AgentId,
|
||||
Channel = ConversationChannel.Phone,
|
||||
ChannelId = request.CallSid,
|
||||
Title = $"Incoming phone call from {request.From}",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ namespace BotSharp.Plugin.Twilio.Models;
|
|||
|
||||
public class ConversationalVoiceRequest : VoiceRequest
|
||||
{
|
||||
[FromQuery(Name = "agent-id")]
|
||||
public string AgentId { get; set; }
|
||||
|
||||
[FromRoute]
|
||||
public string ConversationId { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "8970b1e5-d260-4e2c-90b1-f1415a257c18",
|
||||
"name": "Pizza Bot",
|
||||
"description": "AI assistant that can help customer place pizza order.",
|
||||
"description": "AI assistant that can help customer place pizza order, make payment or inquiry order status.",
|
||||
"type": "routing",
|
||||
"inheritAgentId": "01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a",
|
||||
"createdDateTime": "2023-08-18T10:39:32.2349685Z",
|
||||
|
|
@ -10,10 +10,11 @@
|
|||
"disabled": false,
|
||||
"isPublic": true,
|
||||
"profiles": [ "pizza" ],
|
||||
"labels": [ "experiment" ],
|
||||
"routingRules": [
|
||||
{
|
||||
"type": "reasoner",
|
||||
"field": "NaiveReasoner"
|
||||
"field": "Naive Reasoner"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -6,5 +6,6 @@
|
|||
"id": "b284db86-e9c2-4c25-a59e-4649797dd130",
|
||||
"disabled": false,
|
||||
"isPublic": true,
|
||||
"profiles": [ "pizza" ]
|
||||
"profiles": [ "pizza" ],
|
||||
"labels": [ "experiment" ]
|
||||
}
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
{
|
||||
"name": "Ordering",
|
||||
"description": "Provide types of pizza available, unit price and total cost. Place the order and returned the order number.",
|
||||
"description": "Provide types of pizza available, unit price, total cost and place the order.",
|
||||
"createdDateTime": "2023-07-26T02:29:25.123224Z",
|
||||
"updatedDateTime": "2023-07-26T02:29:25.123274Z",
|
||||
"id": "c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd",
|
||||
"disabled": false,
|
||||
"isPublic": true,
|
||||
"profiles": [ "pizza" ]
|
||||
"profiles": [ "pizza" ],
|
||||
"labels": [ "experiment" ]
|
||||
}
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
"name": "Payment",
|
||||
"description": "Make payment when user wants to pay for the order",
|
||||
"description": "Make payment when user confirmed the price and going to pay for the order",
|
||||
"createdDateTime": "2023-07-26T02:29:25.123224Z",
|
||||
"updatedDateTime": "2023-07-26T02:29:25.123274Z",
|
||||
"id": "fe8c60aa-b114-4ef3-93cb-a8efeac80f75",
|
||||
"disabled": false,
|
||||
"isPublic": true,
|
||||
"profiles": [ "pizza" ],
|
||||
"labels": [ "experiment" ],
|
||||
"routingRules": [
|
||||
{
|
||||
"field": "order_number",
|
||||
|
|
|
|||
Loading…
Reference in a new issue