pub struct TinyHumansMemoryClient { /* private fields */ }Expand description
Async client for the TinyHuman memory API.
Implementations§
Source§impl TinyHumansMemoryClient
impl TinyHumansMemoryClient
Sourcepub fn new(config: TinyHumanConfig) -> Result<Self, TinyHumansError>
pub fn new(config: TinyHumanConfig) -> Result<Self, TinyHumansError>
Create a new client. Token must be non-empty.
Sourcepub async fn insert_memory(
&self,
params: InsertMemoryParams,
) -> Result<InsertMemoryResponse, TinyHumansError>
pub async fn insert_memory( &self, params: InsertMemoryParams, ) -> Result<InsertMemoryResponse, TinyHumansError>
Insert (ingest) a document into memory. POST /memory/insert
Sourcepub async fn query_memory(
&self,
params: QueryMemoryParams,
) -> Result<QueryMemoryResponse, TinyHumansError>
pub async fn query_memory( &self, params: QueryMemoryParams, ) -> Result<QueryMemoryResponse, TinyHumansError>
Query memory via RAG. POST /memory/query
Sourcepub async fn delete_memory(
&self,
params: DeleteMemoryParams,
) -> Result<DeleteMemoryResponse, TinyHumansError>
pub async fn delete_memory( &self, params: DeleteMemoryParams, ) -> Result<DeleteMemoryResponse, TinyHumansError>
Delete memory (admin). POST /memory/admin/delete
Sourcepub async fn recall_memory(
&self,
params: RecallMemoryParams,
) -> Result<RecallMemoryResponse, TinyHumansError>
pub async fn recall_memory( &self, params: RecallMemoryParams, ) -> Result<RecallMemoryResponse, TinyHumansError>
Recall context from Master node. POST /memory/recall
Sourcepub async fn recall_memories(
&self,
params: RecallMemoriesParams,
) -> Result<RecallMemoriesResponse, TinyHumansError>
pub async fn recall_memories( &self, params: RecallMemoriesParams, ) -> Result<RecallMemoriesResponse, TinyHumansError>
Recall memories from Ebbinghaus bank. POST /memory/memories/recall
Sourcepub async fn recall_memories_context(
&self,
params: RecallMemoriesContextParams,
) -> Result<RecallMemoriesContextResponse, TinyHumansError>
pub async fn recall_memories_context( &self, params: RecallMemoriesContextParams, ) -> Result<RecallMemoriesContextResponse, TinyHumansError>
Recall memory context. POST /memory/memories/context
Sourcepub async fn recall_thoughts(
&self,
params: MemoryThoughtsParams,
) -> Result<MemoryThoughtsResponse, TinyHumansError>
pub async fn recall_thoughts( &self, params: MemoryThoughtsParams, ) -> Result<MemoryThoughtsResponse, TinyHumansError>
Generate reflective thoughts from recalled memory context. POST /memory/memories/thoughts
Sourcepub async fn interact_memory(
&self,
params: MemoryInteractionsParams,
) -> Result<MemoryInteractionsResponse, TinyHumansError>
pub async fn interact_memory( &self, params: MemoryInteractionsParams, ) -> Result<MemoryInteractionsResponse, TinyHumansError>
Record entity interactions. POST /memory/interact
Sourcepub async fn record_interactions(
&self,
params: MemoryInteractionsParams,
) -> Result<MemoryInteractionsResponse, TinyHumansError>
pub async fn record_interactions( &self, params: MemoryInteractionsParams, ) -> Result<MemoryInteractionsResponse, TinyHumansError>
Record interaction signals for entities. POST /memory/interactions
Sourcepub async fn query_memory_context(
&self,
params: QueryMemoriesParams,
) -> Result<QueryMemoriesResponse, TinyHumansError>
pub async fn query_memory_context( &self, params: QueryMemoriesParams, ) -> Result<QueryMemoriesResponse, TinyHumansError>
Query memory context (alias route). POST /memory/queries
Sourcepub async fn chat_memory_context(
&self,
params: MemoryConversationParams,
) -> Result<MemoryConversationResponse, TinyHumansError>
pub async fn chat_memory_context( &self, params: MemoryConversationParams, ) -> Result<MemoryConversationResponse, TinyHumansError>
Chat with memory context. POST /memory/conversations
Sourcepub async fn chat_memory(
&self,
params: MemoryChatParams,
) -> Result<MemoryChatResponse, TinyHumansError>
pub async fn chat_memory( &self, params: MemoryChatParams, ) -> Result<MemoryChatResponse, TinyHumansError>
Chat with DeltaNet memory cache. POST /memory/chat
Sourcepub async fn insert_document(
&self,
params: InsertDocumentParams,
) -> Result<InsertDocumentResponse, TinyHumansError>
pub async fn insert_document( &self, params: InsertDocumentParams, ) -> Result<InsertDocumentResponse, TinyHumansError>
Insert a single memory document. POST /memory/documents
Sourcepub async fn insert_documents_batch(
&self,
params: BatchInsertDocumentsParams,
) -> Result<BatchInsertDocumentsResponse, TinyHumansError>
pub async fn insert_documents_batch( &self, params: BatchInsertDocumentsParams, ) -> Result<BatchInsertDocumentsResponse, TinyHumansError>
Insert multiple memory documents in batch. POST /memory/documents/batch
Sourcepub async fn list_documents(
&self,
params: ListDocumentsParams,
) -> Result<ListDocumentsResponse, TinyHumansError>
pub async fn list_documents( &self, params: ListDocumentsParams, ) -> Result<ListDocumentsResponse, TinyHumansError>
List ingested memory documents. GET /memory/documents
Sourcepub async fn get_document(
&self,
document_id: &str,
namespace: Option<&str>,
) -> Result<GetDocumentResponse, TinyHumansError>
pub async fn get_document( &self, document_id: &str, namespace: Option<&str>, ) -> Result<GetDocumentResponse, TinyHumansError>
Get details for a memory document. GET /memory/documents/{documentId}
Sourcepub async fn delete_document(
&self,
document_id: &str,
namespace: &str,
) -> Result<DeleteDocumentResponse, TinyHumansError>
pub async fn delete_document( &self, document_id: &str, namespace: &str, ) -> Result<DeleteDocumentResponse, TinyHumansError>
Delete a memory document. DELETE /memory/documents/{documentId}
Sourcepub async fn sync_memory(
&self,
params: SyncMemoryParams,
) -> Result<SyncMemoryResponse, TinyHumansError>
pub async fn sync_memory( &self, params: SyncMemoryParams, ) -> Result<SyncMemoryResponse, TinyHumansError>
Sync OpenClaw memory files to backend. POST /memory/sync
Sourcepub async fn memory_health(
&self,
) -> Result<MemoryHealthResponse, TinyHumansError>
pub async fn memory_health( &self, ) -> Result<MemoryHealthResponse, TinyHumansError>
Check memory server health status. GET /memory/health
Sourcepub async fn get_ingestion_job(
&self,
job_id: &str,
) -> Result<IngestionJobStatusResponse, TinyHumansError>
pub async fn get_ingestion_job( &self, job_id: &str, ) -> Result<IngestionJobStatusResponse, TinyHumansError>
Get memory ingestion job status. GET /memory/ingestion/jobs/{jobId}
Sourcepub async fn get_graph_snapshot(
&self,
params: GetGraphSnapshotParams,
) -> Result<GetGraphSnapshotResponse, TinyHumansError>
pub async fn get_graph_snapshot( &self, params: GetGraphSnapshotParams, ) -> Result<GetGraphSnapshotResponse, TinyHumansError>
Get admin graph snapshot. GET /memory/admin/graph-snapshot
Sourcepub async fn wait_for_ingestion_job(
&self,
job_id: &str,
timeout_ms: Option<u64>,
poll_interval_ms: Option<u64>,
) -> Result<IngestionJobStatusResponse, TinyHumansError>
pub async fn wait_for_ingestion_job( &self, job_id: &str, timeout_ms: Option<u64>, poll_interval_ms: Option<u64>, ) -> Result<IngestionJobStatusResponse, TinyHumansError>
Poll an ingestion job until it completes, fails, or times out.
Trait Implementations§
Source§impl Clone for TinyHumansMemoryClient
impl Clone for TinyHumansMemoryClient
Source§fn clone(&self) -> TinyHumansMemoryClient
fn clone(&self) -> TinyHumansMemoryClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more