A reference to the structured completion resource.
API
interface StructuredCompletionResourceRef<Output> extends Resource<Output | null> {generatingError: Signal <
Error | undefined
>;isGenerating: Signal <boolean>;isLoading: Signal <boolean>;isLoadingThread: Signal <boolean>;isReceiving: Signal <boolean>;isRunningToolCalls: Signal <boolean>;isSavingThread: Signal <boolean>;isSending: Signal <boolean>;reload: () => boolean;sendingError: Signal <
Error | undefined
>;stop: (clearStreamingMessage?: boolean) => void;threadLoadError: Signal <
| {
error: string;
stacktrace?: string;
}
| undefined
>;threadSaveError: Signal <
| {
error: string;
stacktrace?: string;
}
| undefined
>;}StructuredCompletionResourceRef
@typeOutputgeneratingError
Signal<Error | undefined>Error emitted during generation frames.
isGenerating
Signal<boolean>Indicates whether the completion is generating assistant output.
isLoading
Signal<boolean>Aggregate loading flag across transport, generation, tool calls, and thread load/save.
isLoadingThread
Signal<boolean>Whether a thread load request is in flight.
isReceiving
Signal<boolean>Indicates whether the underlying completion call is currently receiving tokens.
isRunningToolCalls
Signal<boolean>Indicates whether tool calls are running.
isSavingThread
Signal<boolean>Whether a thread save request is in flight.
isSending
Signal<boolean>Indicates whether the underlying completion call is currently sending a message.
reload
() => booleanReloads the resource.
sendingError
Signal<Error | undefined>Transport/request error before generation frames arrive.
stop
(clearStreamingMessage?: boolean) => voidStops any currently-streaming message.
threadLoadError
Signal<{
error: string;
stacktrace?: string;
} | undefined>Error encountered while loading a thread.
threadSaveError
Signal<{
error: string;
stacktrace?: string;
} | undefined>Error encountered while saving a thread.