Streaming request accepted by an injected WebLLM engine; user content defaults to text.
API
interface WebLlmRequest<TUserContent = string> {messages: ({
role: 'system' | 'assistant';
content: string;
} | {
role: 'user';
content: TUserContent;
})[];model?: string;response_format?: {
type: 'json_object';
schema: string;
};stream: true;}WebLlmRequest
@typeTUserContentmessages
({
role: 'system' | 'assistant';
content: string;
} | {
role: 'user';
content: TUserContent;
})[]model
stringresponse_format
{
type: 'json_object';
schema: string;
}stream
true