@react-ai-stream/core
v1.0.0
Published
Backend-agnostic SSE streaming engine and message store for react-ai-stream.
Downloads
926
Maintainers
Readme
@react-ai-stream/core
Backend-agnostic AI streaming primitives — SSE parser, message store, and abort utilities for the react-ai-stream SDK.
This package contains the core primitives — SSE parser, message store, and built-in providers for Anthropic, OpenAI, and custom endpoints. You don't need to install this directly unless you're building your own integration.
Install
npm install @react-ai-stream/coreIncluded
createAIClient(options)— create a streaming client for any providerAnthropicProvider/OpenAIProvider/CustomProvider— provider implementationscreateMessageStore()— Zustand-based message storeparseSSE/normalizeOpenAIChunk/normalizeAnthropicChunk— streaming utilities- Full TypeScript types:
Message,StreamChunk,AIClient,UseAIChatOptions,UseAIChatCallbacks
Documentation
Full docs and examples: github.com/trimooo/react-ai-stream
