Files
marqdo/tests/lib/net-openai-sse.mq.md
T
cflmyandCursor f275d1e030 Drop redundant backticks in *…* / **…** code segments
Value-expression variables inside *…* / **…** segments no longer need
backticks (the segment markers already mark code). Drop trailing spaces
and de-tick value-expression variable names in tests and skill docs;
keep backticks for string interpolation, call args, and method receivers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 17:22:45 +08:00

567 B


title: openai SSE parse offline import net:lib/net.mq.md import json:lib/json.mq.md

main

fixture = "data: {"choices":[{"delta":{"content":"Hel"}}]}\n\ndata: {"choices":[{"delta":{"content":"lo"}}]}\n\ndata: [DONE]\n"

events = > net.openai_sse_parse text=fixture

  • ev t = > json.get value=ev key=type
    1. t == "delta" chunk = > json.get value=ev key=text

    print text=chunk

    1. t == "done" answer = > json.get value=ev key=result

    print text=answer

    print text=bad