This commit is contained in:
Jicheng Lu 2024-11-07 13:53:06 -06:00
parent ad4fc224a3
commit 7415895db1
2 changed files with 2 additions and 2 deletions

View file

@ -159,7 +159,7 @@ public partial class ConversationService : IConversationService
public void SetConversationId(string conversationId, List<MessageState> states, bool isReadOnly = false)
{
_conversationId = conversationId;
_state.Load(_conversationId);
_state.Load(_conversationId, isReadOnly);
states.ForEach(x => _state.SetState(x.Key, x.Value, activeRounds: x.ActiveRounds, source: StateSource.External));
}

View file

@ -89,9 +89,9 @@ public class EvaluatingService : IEvaluatingService
private async Task<RoleDialogModel> SendMessage(string agentId, string conversationId, string text)
{
var conv = _services.GetRequiredService<IConversationService>();
var routing = _services.GetRequiredService<IRoutingService>();
var inputMsg = new RoleDialogModel(AgentRole.User, text);
var routing = _services.GetRequiredService<IRoutingService>();
routing.Context.SetMessageId(conversationId, inputMsg.MessageId);
conv.SetConversationId(conversationId, new List<MessageState>
{