diff --git a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.Rendering.cs b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.Rendering.cs index 00f50a1d..658c4c85 100644 --- a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.Rendering.cs +++ b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.Rendering.cs @@ -68,7 +68,7 @@ public partial class AgentService var name = prop.Name; var node = prop.Value; var matched = true; - if (node.TryGetProperty(visibleExpress, out var element)) + if (node.ValueKind == JsonValueKind.Object && node.TryGetProperty(visibleExpress, out var element)) { var expression = element.GetString(); matched = RenderVisibility(expression, renderDict); diff --git a/src/Plugins/BotSharp.Plugin.DeepSeekAI/Providers/Chat/ChatCompletionProvider.cs b/src/Plugins/BotSharp.Plugin.DeepSeekAI/Providers/Chat/ChatCompletionProvider.cs index c7651e83..0bde4fac 100644 --- a/src/Plugins/BotSharp.Plugin.DeepSeekAI/Providers/Chat/ChatCompletionProvider.cs +++ b/src/Plugins/BotSharp.Plugin.DeepSeekAI/Providers/Chat/ChatCompletionProvider.cs @@ -281,10 +281,6 @@ public class ChatCompletionProvider : IChatCompletion var text = choice.ContentUpdate[0]?.Text ?? string.Empty; textStream.Collect(text); -#if DEBUG - _logger.LogCritical($"Content update: {text}"); -#endif - var content = new RoleDialogModel(AgentRole.Assistant, text) { CurrentAgentId = agent.Id, @@ -325,7 +321,7 @@ public class ChatCompletionProvider : IChatCompletion : string.Empty; #if DEBUG - _logger.LogCritical($"Tool Call (id: {toolCallId}) => {functionName}({functionArgument})"); + _logger.LogTrace($"Tool Call (id: {toolCallId}) => {functionName}({functionArgument})"); #endif responseMessage = new RoleDialogModel(AgentRole.Function, string.Empty) @@ -341,7 +337,7 @@ public class ChatCompletionProvider : IChatCompletion else if (choice.FinishReason.HasValue) { var allText = textStream.GetText(); - _logger.LogCritical($"Text Content: {allText}"); + _logger.LogTrace($"Text Content: {allText}"); responseMessage = new RoleDialogModel(AgentRole.Assistant, allText) {