File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 77use GuzzleHttp \Promise \PromiseInterface ;
88use GuzzleHttp \RequestOptions ;
99use NeuronAI \Chat \Enums \MessageRole ;
10+ use NeuronAI \Chat \Messages \AssistantMessage ;
1011use NeuronAI \Chat \Messages \Message ;
1112use NeuronAI \Chat \Messages \Usage ;
1213use Psr \Http \Message \ResponseInterface ;
@@ -52,7 +53,7 @@ public function chatAsync(array $messages): PromiseInterface
5253 if (\array_key_exists ('functionCall ' , $ parts [0 ]) && !empty ($ parts [0 ]['functionCall ' ])) {
5354 $ response = $ this ->createToolCallMessage ($ content );
5455 } else {
55- $ response = new Message (MessageRole:: from ( $ content [ ' role ' ]), $ parts [0 ]['text ' ] ?? '' );
56+ $ response = new AssistantMessage ( $ parts [0 ]['text ' ] ?? '' );
5657 }
5758
5859 if (\array_key_exists ('groundingMetadata ' , $ result ['candidates ' ][0 ])) {
You can’t perform that action at this time.
0 commit comments