Skip to content

Commit 88093f2

Browse files
committed
fix remove markdown syntax
1 parent 9db9c3d commit 88093f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Service/Agent/JsonResultSerializer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function serialize(ResultInterface $result): AgentMessage
4545
$content = substr($content, 3);
4646
}
4747

48+
if (str_ends_with($content, '```')) {
49+
$content = substr($content, 0, -3);
50+
}
51+
4852
$payload = json_decode($content);
4953
if ($payload instanceof stdClass) {
5054
$object = new AgentMessageObject();

0 commit comments

Comments
 (0)