Node.js SDK (@thesysai/genui-sdk/server)
This SDK provides a function to create a Response Builder object that manages the creation and streaming of the C1 Response.
Main Function
C1ResponseBuilder
Creates and returns an instance of the Response Builder object.
Response Builder Methods
The object returned bymakeC1Response() has the following methods and properties:
(content: string) => void
Pipes the raw string response from a C1 API call (e.g., from the Generative UI or Artifacts endpoint) into the response stream.
(markdown: string) => void
Adds a custom markdown response to the stream. This will be wrapped in
<custom_markdown> tags.(item: ThinkItem) => void
Adds a thinking state entry to the
<thinking> part of the response stream.() => void
Signals that the stream is complete and closes it. This should be called in the
onEnd callback of your stream processing.ReadableStream
The
ReadableStream object that should be returned from your API route.Python SDK (thesys_genui_sdk)
The thesys_genui_sdk package provides the C1Response class, which acts as the Response Builder.
Please refer to the Python SDK Reference for more details.