Skip to content

Commit f06a080

Browse files
authored
Merge pull request #734 from iceljc/master
add missing flag
2 parents ad4fc22 + 7c341fc commit f06a080

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public List<RoleDialogModel> GetDialogHistory(int lastCount = 100, bool fromBrea
159159
public void SetConversationId(string conversationId, List<MessageState> states, bool isReadOnly = false)
160160
{
161161
_conversationId = conversationId;
162-
_state.Load(_conversationId);
162+
_state.Load(_conversationId, isReadOnly);
163163
states.ForEach(x => _state.SetState(x.Key, x.Value, activeRounds: x.ActiveRounds, source: StateSource.External));
164164
}
165165

src/Infrastructure/BotSharp.Core/Evaluations/EvaluatingService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ public async Task<EvaluationResult> Evaluate(string conversationId, EvaluationRe
8989
private async Task<RoleDialogModel> SendMessage(string agentId, string conversationId, string text)
9090
{
9191
var conv = _services.GetRequiredService<IConversationService>();
92+
var routing = _services.GetRequiredService<IRoutingService>();
9293

9394
var inputMsg = new RoleDialogModel(AgentRole.User, text);
94-
var routing = _services.GetRequiredService<IRoutingService>();
9595
routing.Context.SetMessageId(conversationId, inputMsg.MessageId);
9696
conv.SetConversationId(conversationId, new List<MessageState>
9797
{

src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public async Task<PagedItems<ConversationViewModel>> GetConversations([FromBody]
8080
public async Task<IEnumerable<ChatResponseModel>> GetDialogs([FromRoute] string conversationId)
8181
{
8282
var conv = _services.GetRequiredService<IConversationService>();
83-
conv.SetConversationId(conversationId, new List<MessageState>());
83+
conv.SetConversationId(conversationId, new List<MessageState>(), isReadOnly: true);
8484
var history = conv.GetDialogHistory(fromBreakpoint: false);
8585

8686
var userService = _services.GetRequiredService<IUserService>();

0 commit comments

Comments
 (0)