diff --git a/utils/json.ts b/utils/json.ts index 18e6ade..273fc4b 100644 --- a/utils/json.ts +++ b/utils/json.ts @@ -70,14 +70,13 @@ export async function* parseStreamingJson( type: 'object', value: parsed.value as DeepPartial>, } - } else { - console.debug(`Failed to parse JSON: ${removeJsonMarkdown(rawText)}`) } } } // If the last chunk parses failed, return an error if (!isParseSuccessful) { + console.warn(`[parseStreamingJson] Failed to parse JSON: ${removeJsonMarkdown(rawText)}`) yield { type: 'bad-end', rawText,