Skip to content

Commit

Permalink
server: rm superfluous is_alive check in streamed code
Browse files Browse the repository at this point in the history
  • Loading branch information
ochafik committed Sep 29, 2024
1 parent 5f00747 commit 419e995
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3025,9 +3025,6 @@ int main(int argc, char ** argv) {
});
} else {
ctx_server.receive_cmpl_results_stream(task_ids, [&](server_task_result result) -> bool {
if (!is_alive()) {
return false; // connection is closed
}
std::vector<json> result_array = format_partial_response_oaicompat(result.data, completion_id);
for (auto & event_data : result_array) {
if (event_data.empty()) {
Expand Down

0 comments on commit 419e995

Please sign in to comment.