MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / merge_python_path

Function merge_python_path

crates/core/src/plugins/nemo_guardrails/python.rs:711–717  ·  view source on GitHub ↗
(configured: &OsStr, inherited: Option<&OsStr>)

Source from the content-addressed store, hash-verified

709}
710
711fn merge_python_path(configured: &OsStr, inherited: Option<&OsStr>) -> Option<OsString> {
712 let mut paths = env::split_paths(configured).collect::<Vec<_>>();
713 if let Some(inherited) = inherited.filter(|value| !value.is_empty()) {
714 paths.extend(env::split_paths(inherited));
715 }
716 env::join_paths(paths).ok()
717}
718
719fn set_request_id(payload: &mut Json, id: &str) -> FlowResult<()> {
720 let object = payload.as_object_mut().ok_or_else(|| {

Calls 2

okMethod · 0.80
is_emptyMethod · 0.45