react-actions-chat-llms
react-actions-chat-llms is the companion package for backend-routed text-generation flows built on top of react-actions-chat.
Installation
bash
npm install react-actions-chat react-actions-chat-llmsWhat It Adds
createChatTextGenerationFlowcreateTextGenerationBackendChatTextGenerationFlowConfigTextGenerationBackendConfig
Use It When
Use this package when:
- your chat transcript should be turned into LLM-ready messages
- the browser should call your own backend route instead of a provider SDK directly
- you want a small integration layer that can add loading messages, custom assistant rendering, or custom error handling
Use the core package alone when your replies are fully deterministic and do not need text generation.
Typical Shape
- Create a backend client with
createTextGenerationBackend({ url, headers? }). - Create a chat flow with
createChatTextGenerationFlow({ generator, systemPrompt, ... }). - Trigger
flow.respond()after each user turn, or callflow.respondToMessages(...)for a custom transcript slice.
Production Note
This package is designed for backend-routed generation. Keep provider credentials on your own server even if the browser still uses createTextGenerationBackend(...) to call that backend.
Read Next
The runnable demo for this package lives at examples/llm-support.