We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e01616 commit f9a3790Copy full SHA for f9a3790
st_engine/engine/request_processor.py
@@ -87,7 +87,7 @@ def is_sse_event_line(chunk_str: str) -> bool:
87
def remove_chunk_prefix(chunk_str: str, field_mapping: FieldMapping) -> str:
88
"""Remove prefix from chunk string based on field mapping configuration."""
89
result = chunk_str.strip()
90
- if field_mapping.end_prefix:
+ if field_mapping.end_prefix and result.startswith(field_mapping.end_prefix):
91
result = result[len(field_mapping.end_prefix) :].strip()
92
elif field_mapping.stream_prefix and chunk_str.startswith(
93
field_mapping.stream_prefix
0 commit comments