MCPcopy Create free account
hub / github.com/codehamr/codehamr / readSSE

Function readSSE

internal/llm/llm.go:468–536  ·  view source on GitHub ↗

readSSE reads OpenAI SSE frames until [DONE] or EOF, forwarding content/reasoning/tool-call events to out. Returns the final assistant message (content + accumulated tool calls), the server completion and prompt token counts, and any scanner error. parent is threaded through so sends abort on cancel

(parent context.Context, body io.Reader, budget cloud.BudgetStatus, out chan<- Event, onFrame func())

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

runMethod · 0.85

Calls 4

dispatchDeltaFunction · 0.85
sendEventFunction · 0.85
resolveMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected