MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / update

Method update

python/src/memory/client.rs:166–180  ·  view source on GitHub ↗

Update a memory's content.

(&self, py: Python<'_>, memory_id: String, content: String)

Source from the content-addressed store, hash-verified

164
165 /// Update a memory's content.
166 fn update(&self, py: Python<'_>, memory_id: String, content: String) -> PyResult<PyMemory> {
167 let id = parse_memory_id(&memory_id)?;
168 let service = Arc::clone(&self.service);
169 let rt = get_runtime();
170
171 py.allow_threads(|| {
172 rt.block_on(async move {
173 let mem = service
174 .update(&id, &content)
175 .await
176 .map_err(to_py_runtime_error)?;
177 Ok(PyMemory::from(mem))
178 })
179 })
180 }
181
182 /// Delete a single memory by its ID.
183 fn delete(&self, py: Python<'_>, memory_id: String) -> PyResult<()> {

Callers 3

chatMethod · 0.45
embedMethod · 0.45
aembedMethod · 0.45

Calls 2

parse_memory_idFunction · 0.85
get_runtimeFunction · 0.50

Tested by

no test coverage detected