Update docs for 2.2 release (#766)

- Update protocol specs
- Update protocol docs
- Update API specs
This commit is contained in:
cybermaggedon 2026-04-07 22:24:59 +01:00 committed by GitHub
parent c20e6540ec
commit e899370d98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 488 additions and 867 deletions

View file

@ -24,8 +24,13 @@ post:
## Streaming
Enable `streaming: true` to receive the answer as it's generated:
- Multiple messages with `response` content
- Multiple `chunk` messages with `response` content
- `explain` messages with inline provenance triples (`explain_triples`)
- Final message with `end-of-stream: true`
- Session ends with `end_of_session: true`
Explain events carry `explain_id`, `explain_graph`, and `explain_triples`
inline in the stream, so no follow-up knowledge graph query is needed.
Without streaming, returns complete answer in single response.
@ -96,6 +101,21 @@ post:
value:
response: "The research papers present three"
end-of-stream: false
explainEvent:
summary: Explain event with inline provenance triples
value:
message_type: explain
explain_id: urn:trustgraph:question:abc123
explain_graph: urn:graph:retrieval
explain_triples:
- s: {t: i, i: "urn:trustgraph:question:abc123"}
p: {t: i, i: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}
o: {t: i, i: "https://trustgraph.ai/ns/DocumentRagQuestion"}
- s: {t: i, i: "urn:trustgraph:question:abc123"}
p: {t: i, i: "https://trustgraph.ai/ns/query"}
o: {t: l, v: "What are the key findings in the research papers?"}
end-of-stream: false
end_of_session: false
streamingComplete:
summary: Streaming complete marker
value: