Stream HelpersLangChainStream
LangChainStream
Helps with the integration of LangChain. It is compatible with useChat and useCompletion.
Import
React
import { LangChainStream } from "ai"
Parameter
callbacks:
Response Object
stream:
This is the readable stream that can be piped into another stream. This stream contains the results of the LangChain process.
handlers:
This object contains handlers that can be used to handle certain callbacks provided by LangChain.