feat(sdk): rename experimental_thread to thread (#1806)

This commit is contained in:
David Duong
2025-12-03 14:44:14 +01:00
committed by GitHub
parent b78a73835f
commit e19e76c053
3 changed files with 8 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@langchain/langgraph-sdk": minor
---
Rename `experimental_thread` to `thread`, allowing replacing built-in history fetching hook with React Query / SWR
+2 -2
View File
@@ -270,12 +270,12 @@ export function useStreamLGP<
threadId,
historyLimit,
{
passthrough: options.experimental_thread != null,
passthrough: options.thread != null,
submittingRef: threadIdStreamingRef,
onError: options.onError,
}
);
const history = options.experimental_thread ?? builtInHistory;
const history = options.thread ?? builtInHistory;
const getMessages = (value: StateType): Message[] => {
const messagesKey = options.messagesKey ?? "messages";
+1 -2
View File
@@ -284,9 +284,8 @@ export interface UseStreamOptions<
/**
* Manage the thread state externally.
* @experimental
*/
experimental_thread?: UseStreamThread<StateType>;
thread?: UseStreamThread<StateType>;
/**
* Throttle the stream.