MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / ClaudeChunkData

Function ClaudeChunkData

relay/helper/common.go:48–54  ·  view source on GitHub ↗
(c *gin.Context, resp dto.ClaudeResponse, data string)

Source from the content-addressed store, hash-verified

46}
47
48func ClaudeChunkData(c *gin.Context, resp dto.ClaudeResponse, data string) {
49 c.Render(-1, common.CustomEvent{Data: fmt.Sprintf("event: %s\n", resp.Type)})
50 c.Render(-1, common.CustomEvent{Data: fmt.Sprintf("data: %s\n", data)})
51 if flusher, ok := c.Writer.(http.Flusher); ok {
52 flusher.Flush()
53 }
54}
55
56func ResponseChunkData(c *gin.Context, resp dto.ResponsesStreamResponse, data string) {
57 c.Render(-1, common.CustomEvent{Data: fmt.Sprintf("event: %s\n", resp.Type)})

Callers 1

HandleStreamResponseDataFunction · 0.92

Calls 1

RenderMethod · 0.80

Tested by

no test coverage detected