Memory.getThreadById()
.getThreadById() 方法通过其 ID 检索特定线程。
🌐 The .getThreadById() method retrieves a specific thread by its ID.
使用示例Direct link to 使用示例
🌐 Usage Example
await memory?.getThreadById({ threadId: "thread-123" });
参数Direct link to 参数
🌐 Parameters
threadId:
string
The ID of the thread to be retrieved.
返回Direct link to 返回
🌐 Returns
thread:
Promise<StorageThreadType | null>
A promise that resolves to the thread associated with the given ID, or null if not found.
相关Direct link to 相关
🌐 Related
- 内存类参考
- 内存入门(涵盖线程概念)
- 创建线程
- listThreads