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 28
28
use Symfony \AI \Platform \ResultConverterInterface ;
29
29
use Symfony \Component \HttpClient \Chunk \ServerSentEvent ;
30
30
use Symfony \Component \HttpClient \EventSourceHttpClient ;
31
- use Symfony \Component \HttpClient \Exception \JsonException ;
32
31
use Symfony \Contracts \HttpClient \ResponseInterface as HttpResponse ;
33
32
34
33
/**
@@ -79,12 +78,7 @@ private function convertStream(HttpResponse $result): \Generator
79
78
continue ;
80
79
}
81
80
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 ();
88
82
89
83
if ($ this ->streamIsToolCall ($ data )) {
90
84
$ toolCalls = $ this ->convertStreamToToolCalls ($ toolCalls , $ data );
Original file line number Diff line number Diff line change 26
26
use Symfony \AI \Platform \ResultConverterInterface ;
27
27
use Symfony \Component \HttpClient \Chunk \ServerSentEvent ;
28
28
use Symfony \Component \HttpClient \EventSourceHttpClient ;
29
- use Symfony \Component \HttpClient \Exception \JsonException ;
30
29
use Symfony \Contracts \HttpClient \ResponseInterface as HttpResponse ;
31
30
32
31
/**
@@ -67,12 +66,7 @@ private function convertStream(HttpResponse $result): \Generator
67
66
continue ;
68
67
}
69
68
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 ();
76
70
77
71
if ($ this ->streamIsToolCall ($ data )) {
78
72
$ toolCalls = $ this ->convertStreamToToolCalls ($ toolCalls , $ data );
You can’t perform that action at this time.
0 commit comments