aws / aws/bedrock-agentcore-sdk-python
Allow bypass of automatic SSE conversion
- Ngôn ngữ chính
- Python
- Star
- 761
- Fork
- 147
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 7
Mô tả
**Is your feature request related to a problem? Please describe.**
The SDK automatically converts all streaming responses to SSE format even when already in SSE format. This prevents using custom SSE event types.
**Describe the solution you'd like**
Provide a way to customize SSE formatting when streaming responses. Either through a flag to bypass the automatic SSE conversion, or by detecting if the response if already in SSE format.
**Describe alternatives you've considered**
- Double-parsing on the client side.
- Including the event type in the data itself (though this makes efficient, type-safe parsing more difficult).
**Additional context**
The framework automatically detects generators/async generators and forces them through `_convert_to_sse()`.
Current behaviour:
```sse
data: "event: chunk\\ndata: {\\"bytes\\": \\"SGVsbG8gd29ybGQh\\"}\\n\\n"
```
Desired behaviour:
```sse
event: chunk
data: {"bytes": "SGVsbG8gd29ybGQh"}
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách lần theo đường đi trong framework phát hiện các generator và async generator rồi gọi `_convert_to_sse()`; so sánh cách các response vốn đã là SSE được biểu diễn. Xác định hành vi bypass hoặc tùy chỉnh được hỗ trợ, sau đó xác minh rằng các kiểu event tùy chỉnh được giữ nguyên mà không bị chuyển đổi hai lần đối với cả hai dạng streaming.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend-api-design
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100