Merge branch 'master' of https://github.com/SciSharp/BotSharp into features/add-image-generation
This commit is contained in:
commit
da445a8f31
|
|
@ -1,8 +1,8 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<BotSharpVersion>1.5.1</BotSharpVersion>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<BotSharpVersion>1.6.1</BotSharpVersion>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -6,4 +6,5 @@ public class ConversationChannel
|
|||
public const string OpenAPI = "openapi";
|
||||
public const string Phone = "phone";
|
||||
public const string Messenger = "messenger";
|
||||
public const string Email = "email";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,11 @@ public class ConversationController : ControllerBase
|
|||
public async Task<ConversationViewModel> NewConversation([FromRoute] string agentId, [FromBody] MessageConfig config)
|
||||
{
|
||||
var service = _services.GetRequiredService<IConversationService>();
|
||||
var channel = config.States.FirstOrDefault(x => x.Key == "channel");
|
||||
var conv = new Conversation
|
||||
{
|
||||
AgentId = agentId,
|
||||
Channel = ConversationChannel.OpenAPI,
|
||||
Channel = channel == default ? ConversationChannel.OpenAPI : channel.Value,
|
||||
TaskId = config.TaskId
|
||||
};
|
||||
conv = await service.NewConversation(conv);
|
||||
|
|
|
|||
Loading…
Reference in a new issue