MCPcopy Create free account
hub / github.com/acking-you/static_flow / patch_admin_gpt2api_rs

Function patch_admin_gpt2api_rs

crates/frontend/src/api.rs:2627–2640  ·  view source on GitHub ↗
(path: &str, body: &B)

Source from the content-addressed store, hash-verified

2625
2626#[cfg(not(feature = "mock"))]
2627async fn patch_admin_gpt2api_rs<B, T>(path: &str, body: &B) -> Result<T, String>
2628where
2629 B: Serialize,
2630 T: DeserializeOwned,
2631{
2632 let url = format!("{}/admin/gpt2api-rs{path}", admin_base());
2633 let response = api_patch(&url)
2634 .json(body)
2635 .map_err(|e| format!("Serialize error: {:?}", e))?
2636 .send()
2637 .await
2638 .map_err(|e| format!("Network error: {:?}", e))?;
2639 parse_admin_gpt2api_rs_response(response).await
2640}
2641
2642#[cfg(not(feature = "mock"))]
2643async fn delete_admin_gpt2api_rs_empty<T>(path: &str) -> Result<T, String>

Calls 2

api_patchFunction · 0.85

Tested by

no test coverage detected