UseAskResult
Defined in: react/src/useAsk.ts:40
Properties
Section titled “Properties”answer
Section titled “answer”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.
Parameters
Section titled “Parameters”question
Section titled “question”string
Returns
Section titled “Returns”Promise<AskResult>
error:
AskError|null
Defined in: react/src/useAsk.ts:57
Set when status is error.
followUps
Section titled “followUps”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.
Returns
Section titled “Returns”void
status
Section titled “status”status:
AskStatus
Defined in: react/src/useAsk.ts:51