Add RichContent field and PostBackUrl for QuickReplies
This commit is contained in:
parent
eb4e0b0187
commit
e43b3e6fa1
|
|
@ -9,5 +9,6 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent
|
|||
public string? Payload { get; set; }
|
||||
[JsonPropertyName("image_url")]
|
||||
public string? ImageUrl { get; set; }
|
||||
public string? PostBackUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public class ConversationController : ControllerBase, IApiAdapter
|
|||
private readonly IServiceProvider _services;
|
||||
private readonly IUserIdentity _user;
|
||||
|
||||
public ConversationController(IServiceProvider services,
|
||||
public ConversationController(IServiceProvider services,
|
||||
IUserIdentity user)
|
||||
{
|
||||
_services = services;
|
||||
|
|
@ -40,8 +40,8 @@ public class ConversationController : ControllerBase, IApiAdapter
|
|||
}
|
||||
|
||||
[HttpPost("/conversation/{agentId}/{conversationId}")]
|
||||
public async Task<MessageResponseModel> SendMessage([FromRoute] string agentId,
|
||||
[FromRoute] string conversationId,
|
||||
public async Task<MessageResponseModel> SendMessage([FromRoute] string agentId,
|
||||
[FromRoute] string conversationId,
|
||||
[FromBody] NewMessageModel input)
|
||||
{
|
||||
var conv = _services.GetRequiredService<IConversationService>();
|
||||
|
|
@ -73,6 +73,7 @@ public class ConversationController : ControllerBase, IApiAdapter
|
|||
response.Data = inputMsg.Data;
|
||||
response.Function = inputMsg.FunctionName;
|
||||
response.Instruction = inputMsg.Instruction;
|
||||
response.RichContent = inputMsg.RichContent;
|
||||
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using BotSharp.Abstraction.Functions.Models;
|
||||
using BotSharp.Abstraction.Models;
|
||||
using BotSharp.Abstraction.Routing.Models;
|
||||
|
||||
namespace BotSharp.OpenAPI.ViewModels.Conversations;
|
||||
|
||||
|
|
@ -11,4 +10,5 @@ public class MessageResponseModel : ITrackableMessage
|
|||
public string Function { get; set; }
|
||||
public object Data { get; set; }
|
||||
public FunctionCallFromLlm Instruction { get; set; }
|
||||
public object? RichContent { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue