mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 17:27:21 +00:00
Fixed AI Studio discarding answers of the AI written in an unexpected JSON form (#1109)
This commit is contained in:
1 parent
d26139936a
commit
c7be04b727
11 files changed
+443
-256
No files matched your search
@@ -1,7 +1,6 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using AIStudio.Assistants.Builder;
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Local
|
||||
|
||||
namespace AIStudio.Tools.PowerPoint;
|
||||
@@ -45,8 +44,8 @@ internal sealed partial record SlideDeckSpec
|
||||
spec = new SlideDeckSpec(string.Empty, []);
|
||||
issue = string.Empty;
|
||||
|
||||
var json = LuaResponse.ExtractJson(modelResponse);
|
||||
if (string.IsNullOrWhiteSpace(json))
|
||||
var json = ModelAnswerJson.ExtractObject(modelResponse);
|
||||
if (json.IsWhiteSpace())
|
||||
{
|
||||
issue = "The answer contains no complete JSON object.";
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user