Skip to content

Commit 42a0afd

Browse files
authored
server : do not parse when flushing http headers (ggml-org#24281)
1 parent a66d505 commit 42a0afd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tools/server/server-task.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,9 @@ json server_task_result_cmpl_final::to_json_anthropic_stream() {
13931393
//
13941394
void server_task_result_cmpl_partial::update(task_result_state & state) {
13951395
is_updated = true;
1396+
if (is_begin) {
1397+
return; // begin marker only flushes headers, skip parsing
1398+
}
13961399
state.update_chat_msg(content, true, oaicompat_msg_diffs);
13971400

13981401
// Copy current state for use in to_json_*() (reflects state BEFORE this chunk)

0 commit comments

Comments
 (0)