Memory.getThreadById()
.getThreadById() メソッドは、ID を指定して特定のスレッドを取得します。
使用例使用例への直接リンク
await memory?.getThreadById({ threadId: 'thread-123' })
パラメーターパラメーターへの直接リンク
threadId:
string
取得するスレッドの ID。
戻り値戻り値への直接リンク
thread:
Promise<StorageThreadType | null>
指定した ID に関連付けられたスレッドへ解決される Promise。見つからない場合は null。
関連項目関連項目への直接リンク
- Memory クラスリファレンス
- Memory 入門(スレッドの概念を解説)
- createThread
- listThreads