@threadplane/chatFunctionv0.3.4

createContentClassifier

Create a ContentClassifier — the streaming accumulator that inspects an assistant message's content as it arrives and classifies it (markdown vs a generative-UI/A2UI spec), exposing the parsed result and per-element state as signals so the renderer can switch modes mid-stream.

import { createContentClassifier } from '@threadplane/chat';

Declaration · overload 1

export declare function createContentClassifier(): ContentClassifier;

Returns

ContentClassifier

A fresh ContentClassifier; call dispose() when done.

Examples

const cc = createContentClassifier();
effect(() => console.log(cc.type())); // 'pending' | 'markdown' | 'spec'