MCPcopy
hub / github.com/PromtEngineer/localGPT / emit

Method emit

rag_system/api_server.py:387–395  ·  view source on GitHub ↗

Send a single SSE event.

(event_type: str, payload)

Source from the content-addressed store, hash-verified

385 self.end_headers()
386
387 def emit(event_type: str, payload):
388 """Send a single SSE event."""
389 try:
390 data_str = json.dumps({"type": event_type, "data": payload})
391 self.wfile.write(f"data: {data_str}\n\n".encode('utf-8'))
392 self.wfile.flush()
393 except BrokenPipeError:
394 # Client disconnected
395 raise
396
397 # Run the agent synchronously, emitting checkpoints
398 try:

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected