getThreadById Reference ✅
The getThreadById
function retrieves a specific thread by its ID from storage.
Usage Example ✅
import { Memory } from "@kastrax/core/memory";
const memory = new Memory(config);
const thread = await memory.getThreadById({ threadId: "thread-123" });
Parameters ✅
threadId:
string
The ID of the thread to be retrieved.
Returns ✅
StorageThreadType | null:
Promise
A promise that resolves to the thread associated with the given ID, or null if not found.
Related
- Memory Class Reference
- Getting Started with Memory (Covers threads concept)
- createThread
- getThreadsByResourceId
Last updated on