Files
marqdo/tests/ext/llm-ask-offline.mq.md
T
cflmyandCursor 1f8e61f3bf feat(llm): semantic ask/stream/collect surface (005)
Lift ext/ai/llm from OpenAI HTTP client to an intelligence primitive;
keep complete as compat. Add unified ai-stack roadmap linking agent + llm.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 13:35:38 +08:00

20 lines
582 B
Markdown

---
title: llm create + collect offline
description: Factory create + collect alias; no network.
import llm:ext/ai/llm.mq.md
import net:lib/net.mq.md
---
# main
**model = > llm.create**
> print text=[model](`model`)
> print text=[backend](`model`)
**fixture = "data: {\"choices\":[{\"delta\":{\"content\":\"Hi\"}}]}\n\ndata: {\"choices\":[{\"delta\":{\"content\":\"!\"}}]}\n\ndata: [DONE]\n"**
**events = > net.openai_sse_parse text=`fixture`**
**answer = > llm.collect events=`events`**
> print text=`answer`
**alias = > llm.stream_result events=`events`**
> print text=`alias`