Skip to content

Commit 1d70359

Browse files
committed
Set default channel value for webchat.
1 parent 5d49b1b commit 1d70359

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
using BotSharp.Abstraction.Models;
2-
31
namespace BotSharp.Abstraction.Conversations.Models;
42

53
public class IncomingMessageModel : MessageConfig
64
{
75
public string Text { get; set; } = string.Empty;
8-
public virtual string Channel { get; set; }
6+
public virtual string Channel { get; set; } = string.Empty;
97
}

src/Plugins/BotSharp.Plugin.ChatbotUI/ChatbotUiController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public async Task SendMessage([FromBody] OpenAiMessageInput input)
7878
conv.SetConversationId(input.ConversationId, input.States);
7979
conv.States.SetState("provider", input.Provider)
8080
.SetState("model", input.Model)
81-
.SetState("channel", "webchat")
81+
.SetState("channel", input.Channel)
8282
.SetState("temperature", input.Temperature)
8383
.SetState("sampling_factor", input.SamplingFactor);
8484

src/Plugins/BotSharp.Plugin.ChatbotUI/ViewModels/OpenAiMessageInput.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class OpenAiMessageInput : IncomingMessageModel
99
{
1010
public string AgentId { get; set; } = string.Empty;
1111
public string ConversationId { get; set; } = string.Empty;
12+
public override string Channel { get; set; } = "webchat";
1213

1314
public List<OpenAiMessageBody> Messages { get; set; } = new List<OpenAiMessageBody>();
1415

0 commit comments

Comments
 (0)