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

Method apply_node_llm_overrides

python/src/workflow/executor.rs:824–838  ·  view source on GitHub ↗
(
        mut req: graphbit_core::llm::LlmRequest,
        node_config: &std::collections::HashMap<String, serde_json::Value>,
    )

Source from the content-addressed store, hash-verified

822 }
823
824 fn apply_node_llm_overrides(
825 mut req: graphbit_core::llm::LlmRequest,
826 node_config: &std::collections::HashMap<String, serde_json::Value>,
827 ) -> graphbit_core::llm::LlmRequest {
828 if let Some(temp) = node_config.get("temperature").and_then(|v| v.as_f64()) {
829 req = req.with_temperature(temp as f32);
830 }
831 if let Some(max_tokens) = node_config.get("max_tokens").and_then(|v| v.as_u64()) {
832 req = req.with_max_tokens(max_tokens as u32);
833 }
834 if let Some(top_p) = node_config.get("top_p").and_then(|v| v.as_f64()) {
835 req = req.with_top_p(top_p as f32);
836 }
837 req
838 }
839
840 fn build_llm_request_with_tools(
841 messages: Vec<graphbit_core::llm::LlmMessage>,

Callers

nothing calls this directly

Calls 4

with_top_pMethod · 0.80
getMethod · 0.45
with_temperatureMethod · 0.45
with_max_tokensMethod · 0.45

Tested by

no test coverage detected