Skip to content

UseAskResult

Defined in: react/src/useAsk.ts:40

answer: string

Defined in: react/src/useAsk.ts:50

The answer so far while streaming, the whole answer when done. After an error, the text received before it stopped.


ask: (question) => Promise<AskResult>

Defined in: react/src/useAsk.ts:47

Ask a question. A question still running is stopped first. Resolves with core’s result and never rejects; a question stopped by a newer one, by reset() or by unmount resolves with reason: "aborted" and changes no state.

string

Promise<AskResult>


error: AskError | null

Defined in: react/src/useAsk.ts:57

Set when status is error.


followUps: string[]

Defined in: react/src/useAsk.ts:55

Suggested next questions.


links: AskLink[]

Defined in: react/src/useAsk.ts:53

Links the answer points to.


reset: () => void

Defined in: react/src/useAsk.ts:59

Stop a running question, forget the conversation and go back to idle.

void


status: AskStatus

Defined in: react/src/useAsk.ts:51