Skip to content

AskOptions

Defined in: ask.ts:40

apiBase: string

Defined in: ask.ts:41


optional apiBaseProvenance?: "explicit" | "key"

Defined in: ask.ts:64

Where apiBase came from; see FetchFragmentsOptions.apiBaseProvenance. Defaults to “explicit”.


optional campaignId?: string

Defined in: ask.ts:44

Pin the answer to one public campaign.


optional fetchImpl?: (input, init?) => Promise<Response>

Defined in: ask.ts:66

Test seam; defaults to the platform fetch.

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>


optional idleTimeoutMs?: number

Defined in: ask.ts:62

How long the call waits with no bytes from the edge, in milliseconds. Default 30000. Each piece that arrives starts it again. 0 or Infinity turns it off.


optional onChunk?: (chunk, answer) => void

Defined in: ask.ts:56

Called with each piece of the answer as it is written. Giving it makes the request a stream. answer is the text received so far.

string

string

void


optional organizationId?: string

Defined in: ask.ts:46

Without a campaign, the brand’s whole live roster answers. Needs a live key or a brand host.


optional publishableKey?: string

Defined in: ask.ts:48

st_pk_live_…. Sent as Authorization: Bearer <key>.


question: string

Defined in: ask.ts:42


optional session?: string

Defined in: ask.ts:50

The session from an earlier answer, to continue that conversation.


optional signal?: AbortSignal

Defined in: ask.ts:51