AI streaming
Stream an answer token by token over a single response.
.phlo
// stream a model answer token by token over one response
route async POST chat ask {
%res->streaming = true
foreach (%Claude->stream(user: %payload->q) AS $chunk){
apply(append: ['#answer' => $chunk->text])
}
}
YouHow does Phlo stream an answer?
Phlo