AskOptions
Defined in: ask.ts:40
Properties
Section titled “Properties”apiBase
Section titled “apiBase”apiBase:
string
Defined in: ask.ts:41
apiBaseProvenance?
Section titled “apiBaseProvenance?”
optionalapiBaseProvenance?:"explicit"|"key"
Defined in: ask.ts:64
Where apiBase came from; see FetchFragmentsOptions.apiBaseProvenance. Defaults to “explicit”.
campaignId?
Section titled “campaignId?”
optionalcampaignId?:string
Defined in: ask.ts:44
Pin the answer to one public campaign.
fetchImpl?
Section titled “fetchImpl?”
optionalfetchImpl?: (input,init?) =>Promise<Response>
Defined in: ask.ts:66
Test seam; defaults to the platform fetch.
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
idleTimeoutMs?
Section titled “idleTimeoutMs?”
optionalidleTimeoutMs?: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.
onChunk?
Section titled “onChunk?”
optionalonChunk?: (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.
Parameters
Section titled “Parameters”string
answer
Section titled “answer”string
Returns
Section titled “Returns”void
organizationId?
Section titled “organizationId?”
optionalorganizationId?:string
Defined in: ask.ts:46
Without a campaign, the brand’s whole live roster answers. Needs a live key or a brand host.
publishableKey?
Section titled “publishableKey?”
optionalpublishableKey?:string
Defined in: ask.ts:48
st_pk_live_…. Sent as Authorization: Bearer <key>.
question
Section titled “question”question:
string
Defined in: ask.ts:42
session?
Section titled “session?”
optionalsession?:string
Defined in: ask.ts:50
The session from an earlier answer, to continue that conversation.
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: ask.ts:51