mirror of
https://github.com/langchain-ai/langgraphjs.git
synced 2026-07-21 08:35:23 -04:00
feat(sdk): rename experimental_thread to thread (#1806)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph-sdk": minor
|
||||
---
|
||||
|
||||
Rename `experimental_thread` to `thread`, allowing replacing built-in history fetching hook with React Query / SWR
|
||||
@@ -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";
|
||||
|
||||
@@ -284,9 +284,8 @@ export interface UseStreamOptions<
|
||||
|
||||
/**
|
||||
* Manage the thread state externally.
|
||||
* @experimental
|
||||
*/
|
||||
experimental_thread?: UseStreamThread<StateType>;
|
||||
thread?: UseStreamThread<StateType>;
|
||||
|
||||
/**
|
||||
* Throttle the stream.
|
||||
|
||||
Reference in New Issue
Block a user