implementing-chat-streaming
Installation
SKILL.md
Chat Streaming Implementation
Backend: SSE Endpoint
app.MapPost("/api/chat/stream", async (
ChatRequest request,
AgentFrameworkService agentService,
HttpContext httpContext,
CancellationToken cancellationToken) =>
{
httpContext.Response.Headers.Append("Content-Type", "text/event-stream");
httpContext.Response.Headers.Append("Cache-Control", "no-cache");
var conversationId = request.ConversationId
?? await agentService.CreateConversationAsync(request.Message, cancellationToken);