UNPKG

@langchain/langgraph-sdk

Version:

Client library for interacting with the LangGraph API

23 lines (22 loc) • 688 B
//#region src/stream/dispatch-config.ts /** * Merge `thread_id` into a user-supplied `config.configurable` blob. * * The platform expects `config.configurable.thread_id` on every run * dispatch. Applied last so a user-supplied value can't override the * active thread id. */ function bindThreadConfig(config, threadId) { const base = config != null && typeof config === "object" ? config : {}; const configurable = base.configurable != null && typeof base.configurable === "object" ? base.configurable : {}; return { ...base, configurable: { ...configurable, thread_id: threadId } }; } //#endregion export { bindThreadConfig }; //# sourceMappingURL=dispatch-config.js.map