Skip to content

Commit f9a3790

Browse files
committed
fix: remove_chunk_prefix end_prefix
1 parent 3e01616 commit f9a3790

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

st_engine/engine/request_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def is_sse_event_line(chunk_str: str) -> bool:
8787
def remove_chunk_prefix(chunk_str: str, field_mapping: FieldMapping) -> str:
8888
"""Remove prefix from chunk string based on field mapping configuration."""
8989
result = chunk_str.strip()
90-
if field_mapping.end_prefix:
90+
if field_mapping.end_prefix and result.startswith(field_mapping.end_prefix):
9191
result = result[len(field_mapping.end_prefix) :].strip()
9292
elif field_mapping.stream_prefix and chunk_str.startswith(
9393
field_mapping.stream_prefix

0 commit comments

Comments
 (0)