| 8112 | } else { |
| 8113 | st->mode = OPENAI_STREAM_SUPPRESS; |
| 8114 | } |
| 8115 | } else if (final) { |
| 8116 | st->mode = OPENAI_STREAM_SUPPRESS; |
| 8117 | } |
| 8118 | } |
| 8119 | |
| 8120 | if (st->mode == OPENAI_STREAM_TOOL) { |
| 8121 | if (!openai_tool_stream_update(fd, s, r, id, &st->tool, raw, raw_len)) return false; |
| 8122 | if (!st->tool.active) st->mode = OPENAI_STREAM_SUPPRESS; |
| 8123 | } |
| 8124 | return true; |
no test coverage detected