fix: 部分场景下 LLM 返回数据格式异常的问题

This commit is contained in:
WJG 2024-05-26 18:55:45 +08:00
parent f316f68b3c
commit 02b033402e
No known key found for this signature in database
GPG Key ID: 258474EF8590014A
2 changed files with 2 additions and 2 deletions

View File

@ -67,6 +67,6 @@ export class LongTermMemoryAgent {
shortTermMemory: lastOf(newMemories)!.text,
}),
});
return jsonDecode(res?.content)?.longTermMemories;
return jsonDecode(res?.content)?.longTermMemories?.toString();
}
}

View File

@ -78,6 +78,6 @@ export class ShortTermMemoryAgent {
.join("\n"),
}),
});
return jsonDecode(res?.content)?.shortTermMemories;
return jsonDecode(res?.content)?.shortTermMemories?.toString();
}
}