Skip to content

Quantum 0.20.0 ​

Added ​

  • A failure contract for AI (IA-5). onerror="continue" on q:llm, q:knowledge and q:query (any datasource) lets a page handle a failure: <name>_result.success is false and error.message says why — an assistant page can say "unavailable" instead of answering 500.
  • Answers that cite their sources (M5, IA-6). q:llm knowledge="docs" retrieves the top chunks of a knowledge base, asks the model to answer only from them citing [n], and exposes sources and cited in <name>_result. With nothing retrieved the model is not called (found: false) — no uncited answer from memory.
  • Answers that arrive as they are written (M5, IA-7). q:llm stream="true" renders the page at once; <ui:stream for="answer"> shows the answer as the model writes it, in the browser (the framework's script, no JavaScript to write) and in the console. One-time tokens bound to the session; a failure halfway is shown as an error.
  • urlencode(v) in expressions (EXPR-12), for values put in a URL.
  • projects/shop-agent: a q:agent answering questions about a shop's SQLite database through read-only query tools; the page lists every call.
  • onerror="continue" on q:agent (IA-5), and call in each of <name>_result.actions: the call written out, low_stock(below=5).
  • projects/docs-assistant: ask the Quantum guide; the answer is grounded in docs/guide, cites its pages and streams. It says so when the model server or the index is unavailable.

Breaking ​

  • A q:knowledge source that cannot be read (missing file or folder, no file matching the pattern, a failing query) is an error; it used to be a log warning and the base was built from fewer documents (IA-8).
  • q:source type="url" (it read nothing) and unknown source types are parse errors (IA-8).
  • A q:agent that does not finish stops the page, like q:llm (IA-5); it used to leave success: false and an empty answer on a page that went on. onerror="continue" keeps the old behaviour.
  • A q:agent's timeout (milliseconds, 60000 by default) is now the whole run's budget: each model call gets what is left. Before, every call waited 60 s whatever timeout said. An agent on a slow local model may need a larger timeout.
  • q:agent max_iterations= is a parse error: the attribute is maxIterations. The guide and the README wrote max_iterations, which was never read.
  • Inside a q:if, a q:else/q:elseif right after an inner </q:if> is a parse error (IF-4): it belonged to the outer q:if, not the one it follows. examples/message-queue-example.q had exactly this bug.

Fixed ​

  • q:llm timeout= was read and never used: every request waited 60 seconds (and stream="true" too). It is honoured now, and a q:agent's timeout reaches its model calls.
  • A RAG query on a knowledge base that failed to build answered "Knowledge base is still loading. Please refresh the page." with success: true; it is an error with the real reason now.

Changed ​

  • q:llm's <name>_result.error is {message: ...}, as q:invoke's.

← 0.19.0 · All versions · 0.21.0 →

MIT Licensed · Built with VitePress