@langchain/langgraph-sdk
Version:
Client library for interacting with the LangGraph API
17 lines (15 loc) • 475 B
JavaScript
import { useStreamLGP } from "./stream.lgp.js";
import { useStreamCustom } from "./stream.custom.js";
import { useState } from "react";
//#region src/react/stream.tsx
function isCustomOptions(options) {
return "transport" in options;
}
function useStream(options) {
const [isCustom] = useState(isCustomOptions(options));
if (isCustom) return useStreamCustom(options);
return useStreamLGP(options);
}
//#endregion
export { useStream };
//# sourceMappingURL=stream.js.map