Skip to main content

Interface: UseChat

Defined in: react/src/chat.ts:17

Extends​

Properties​

error?​

optional error?: Error

Defined in: react/src/chat.ts:14

Inherited from​

ChatState.error


progress?​

optional progress?: string

Defined in: react/src/chat.ts:11

Progress worth showing while it starts, e.g. "Starting Codex…".

Inherited from​

ChatState.progress


provider?​

optional provider?: ProviderInfo

Defined in: react/src/chat.ts:13

Who answers.

Inherited from​

ChatState.provider


start​

start: <T>(request) => ChatRun<T>

Defined in: react/src/chat.ts:22

Start a one-shot request; a running one is stopped. Await run.text() or run.object() for the result.

Type Parameters​

T​

T = unknown

Parameters​

request​

ChatRequest<T>

Returns​

ChatRun<T>


status​

status: "idle" | "running" | "done" | "error"

Defined in: react/src/chat.ts:7

Inherited from​

ChatState.status


stop​

stop: () => void

Defined in: react/src/chat.ts:23

Returns​

void


text​

text: string

Defined in: react/src/chat.ts:9

The answer so far, streamed.

Inherited from​

ChatState.text