Install

Quickstart

React Native

Streaming fetch needs a polyfill for incremental onToken callbacks:
Without the polyfill the SDK degrades gracefully: the resolved ChatResult is still correct, but tokens arrive all at once.

Transport

Default transport: "auto" uses WebSocket with automatic SSE fallback:
One WebSocket connection is reused across sequential chat() calls and re-established if closed. A 5-second connect timeout triggers permanent SSE fallback in auto mode. React Native and Node 22+ have global WebSocket; earlier Node versions fall back to SSE automatically.

Constructor options

bq.chat(query, opts?)Promise<ChatResult>

bq.search(query, opts?)Promise<SearchResponse>

bq.feedback(payload)Promise<void>

Error handling

Local testing