| 838 | } |
| 839 | |
| 840 | fn build_llm_request_with_tools( |
| 841 | messages: Vec<graphbit_core::llm::LlmMessage>, |
| 842 | llm_tools: &[graphbit_core::llm::LlmTool], |
| 843 | node_config: &std::collections::HashMap<String, serde_json::Value>, |
| 844 | ) -> graphbit_core::llm::LlmRequest { |
| 845 | let mut req = graphbit_core::llm::LlmRequest::with_messages(messages); |
| 846 | for tool in llm_tools { |
| 847 | req = req.with_tool(tool.clone()); |
| 848 | } |
| 849 | Self::apply_node_llm_overrides(req, node_config) |
| 850 | } |
| 851 | |
| 852 | async fn execute_llm_request_with_optional_stream( |
| 853 | llm_provider: &graphbit_core::llm::LlmProvider, |