Skip to main content

getAIState

还没翻译译自英文(ai-sdk.dev)本页 11 段都还没译

Warning

AI SDK RSC is currently experimental. We recommend using AI SDK UI for production. For guidance on migrating from RSC to UI, see our migration guide.

Get the current AI state.

Import

import { getAIState } from "@ai-sdk/rsc"

API Signature

Parameters

  • key? (string): Returns the value of the specified key in the AI state, if it's an object.

Returns

The AI state.

Examples