aws / aws/bedrock-agentcore-sdk-python

Allow bypass of automatic SSE conversion

Abierto
#52 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
761
Forks
147
Merge medio
1 d 23 h
PR fusionados (30 d)
7

Descripción

**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"}
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza siguiendo la ruta del framework que detecta generadores y generadores asíncronos y llama a `_convert_to_sse()`; compara cómo se representan las respuestas que ya son SSE. Define el comportamiento de bypass o personalización compatible y, después, verifica que los tipos de evento personalizados se conserven sin conversión doble en ambas formas de streaming.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
backend-api-design
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.