From ccc3089066bfa46498361b34dacf8717e1af097f Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Tue, 18 Feb 2025 15:42:07 +0100 Subject: [PATCH] Optimization --- app/MindWork AI Studio/Agents/AgentDataSourceSelection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Agents/AgentDataSourceSelection.cs b/app/MindWork AI Studio/Agents/AgentDataSourceSelection.cs index 3eb5de99..557c30be 100644 --- a/app/MindWork AI Studio/Agents/AgentDataSourceSelection.cs +++ b/app/MindWork AI Studio/Agents/AgentDataSourceSelection.cs @@ -298,7 +298,7 @@ public sealed class AgentDataSourceSelection (ILogger // We know how bad LLM may be in generating JSON without surrounding text. // Thus, we expect the worst and try to extract the JSON list from the text: // - var json = this.ExtractJson(selectedDataSourcesJson); + var json = ExtractJson(selectedDataSourcesJson); try { @@ -344,7 +344,7 @@ public sealed class AgentDataSourceSelection (ILogger /// /// The text that may contain the JSON list. /// The extracted JSON list. - private string ExtractJson(string text) => ExtractJson(text.AsSpan()).ToString(); + private static string ExtractJson(string text) => ExtractJson(text.AsSpan()).ToString(); /// /// Extracts the JSON list from the given text. The text may contain additional