Merge branch 'master' of https://github.com/SciSharp/BotSharp into features/refine-model-settings

This commit is contained in:
Jicheng Lu 2025-08-25 10:08:31 -05:00
commit 261a01a291

View file

@ -44,8 +44,9 @@ public partial class AgentService
[SharpCache(10)] [SharpCache(10)]
public async Task<Agent> GetAgent(string id) public async Task<Agent> GetAgent(string id)
{ {
if (string.IsNullOrWhiteSpace(id)) if (string.IsNullOrWhiteSpace(id) || id == Guid.Empty.ToString())
{ {
_logger.LogWarning($"Can't find agent {id}, AgentId is empty.");
return null; return null;
} }