|
| 1 | +using BotSharp.Abstraction.Agents.Enums; |
1 | 2 | using BotSharp.Abstraction.ApiAdapters; |
2 | 3 | using BotSharp.Abstraction.Conversations.Enums; |
3 | 4 | using BotSharp.Abstraction.Conversations.Models; |
@@ -99,14 +100,15 @@ public async Task<ChatResponseModel> SendMessage([FromRoute] string agentId, |
99 | 100 | { |
100 | 101 | var conv = _services.GetRequiredService<IConversationService>(); |
101 | 102 | conv.SetConversationId(conversationId, input.States); |
102 | | - conv.States.SetState("provider", input.Provider) |
| 103 | + conv.States.SetState("channel", input.Channel) |
| 104 | + .SetState("provider", input.Provider) |
103 | 105 | .SetState("model", input.Model) |
104 | 106 | .SetState("temperature", input.Temperature) |
105 | 107 | .SetState("sampling_factor", input.SamplingFactor); |
106 | 108 |
|
107 | 109 | var response = new ChatResponseModel(); |
108 | | - var inputMsg = new RoleDialogModel("user", input.Text); |
109 | | - await conv.SendMessage(agentId, input.Channel, inputMsg, |
| 110 | + var inputMsg = new RoleDialogModel(AgentRole.User, input.Text); |
| 111 | + await conv.SendMessage(agentId, inputMsg, |
110 | 112 | async msg => |
111 | 113 | { |
112 | 114 | response.Text = msg.Content; |
|
0 commit comments