Skip to content

Function: isReasoningBlock()

@providerprotocol/ai


@providerprotocol/ai / @providerprotocol/ai / isReasoningBlock

isReasoningBlock(block): block is ReasoningBlock

Defined in: src/types/content.ts:485

Type guard for ReasoningBlock.

ContentBlock

The content block to check

block is ReasoningBlock

True if the block is a ReasoningBlock

if (isReasoningBlock(block)) {
console.log(block.text);
}