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

Method extract_llm_tools

python/src/workflow/executor.rs:792–811  ·  view source on GitHub ↗
(
        node_config: &std::collections::HashMap<String, serde_json::Value>,
    )

Source from the content-addressed store, hash-verified

790 }
791
792 fn extract_llm_tools(
793 node_config: &std::collections::HashMap<String, serde_json::Value>,
794 ) -> Vec<graphbit_core::llm::LlmTool> {
795 use graphbit_core::llm::LlmTool;
796 node_config
797 .get("tool_schemas")
798 .and_then(|v| v.as_array())
799 .map(|schemas| {
800 schemas
801 .iter()
802 .filter_map(|schema| {
803 let name = schema.get("name")?.as_str()?;
804 let description = schema.get("description")?.as_str()?;
805 let parameters = schema.get("parameters")?;
806 Some(LlmTool::new(name, description, parameters.clone()))
807 })
808 .collect::<Vec<LlmTool>>()
809 })
810 .unwrap_or_default()
811 }
812
813 fn extract_max_iterations(
814 node_config: &std::collections::HashMap<String, serde_json::Value>,

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected