File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
DockerModelRunner/Completions Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change 2828use Symfony \AI \Platform \ResultConverterInterface ;
2929use Symfony \Component \HttpClient \Chunk \ServerSentEvent ;
3030use Symfony \Component \HttpClient \EventSourceHttpClient ;
31- use Symfony \Component \HttpClient \Exception \JsonException ;
3231use Symfony \Contracts \HttpClient \ResponseInterface as HttpResponse ;
3332
3433/**
@@ -79,12 +78,7 @@ private function convertStream(HttpResponse $result): \Generator
7978 continue ;
8079 }
8180
82- try {
83- $ data = $ chunk ->getArrayData ();
84- } catch (JsonException ) {
85- // try catch only needed for Symfony 6.4
86- continue ;
87- }
81+ $ data = $ chunk ->getArrayData ();
8882
8983 if ($ this ->streamIsToolCall ($ data )) {
9084 $ toolCalls = $ this ->convertStreamToToolCalls ($ toolCalls , $ data );
Original file line number Diff line number Diff line change 2626use Symfony \AI \Platform \ResultConverterInterface ;
2727use Symfony \Component \HttpClient \Chunk \ServerSentEvent ;
2828use Symfony \Component \HttpClient \EventSourceHttpClient ;
29- use Symfony \Component \HttpClient \Exception \JsonException ;
3029use Symfony \Contracts \HttpClient \ResponseInterface as HttpResponse ;
3130
3231/**
@@ -67,12 +66,7 @@ private function convertStream(HttpResponse $result): \Generator
6766 continue ;
6867 }
6968
70- try {
71- $ data = $ chunk ->getArrayData ();
72- } catch (JsonException ) {
73- // try catch only needed for Symfony 6.4
74- continue ;
75- }
69+ $ data = $ chunk ->getArrayData ();
7670
7771 if ($ this ->streamIsToolCall ($ data )) {
7872 $ toolCalls = $ this ->convertStreamToToolCalls ($ toolCalls , $ data );
You can’t perform that action at this time.
0 commit comments