MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / update

Method update

core/src/memory/service.rs:156–165  ·  view source on GitHub ↗

Update a memory's content by ID.

(&self, memory_id: &MemoryId, content: &str)

Source from the content-addressed store, hash-verified

154
155 /// Update a memory's content by ID.
156 pub async fn update(&self, memory_id: &MemoryId, content: &str) -> GraphBitResult<Memory> {
157 let old = self
158 .store
159 .get_memory(memory_id)
160 .await?
161 .ok_or_else(|| GraphBitError::memory(format!("Memory not found: {memory_id}")))?;
162
163 self.update_memory_internal(memory_id, content, &old.content)
164 .await
165 }
166
167 /// Delete a single memory by its ID.
168 pub async fn delete(&self, memory_id: &MemoryId) -> GraphBitResult<()> {

Callers 1

Calls 2

get_memoryMethod · 0.80

Tested by

no test coverage detected