Skip to content

Commit fdab15b

Browse files
Codingwqywqy
andauthored
Fix McpExecutor kag_project_config initialization for MCP HTTP store_path (#736)
Co-authored-by: wqy <2437671377@qq.com>
1 parent 775b7f6 commit fdab15b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

kag/solver/executor/mcp/mcp_executor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ def __init__(
3535
super().__init__(**kwargs)
3636
self.name = name
3737
self.description = description
38+
# get project config
39+
task_id = kwargs.get(KAGConstants.KAG_QA_TASK_CONFIG_KEY, None)
40+
kag_config = KAGConfigAccessor.get_config(task_id)
41+
self.kag_project_config = kag_config.global_config
3842
self.mcp_file_path = self.download_data(store_path)
3943
self.prompt = prompt
4044
self.env = dict(env)
4145
self.llm = llm
4246
self.mcp_client = MCPClient(self.llm, self.prompt)
43-
task_id = kwargs.get(KAGConstants.KAG_QA_TASK_CONFIG_KEY, None)
44-
kag_config = KAGConfigAccessor.get_config(task_id)
45-
self.kag_project_config = kag_config.global_config
4647

4748
def download_data(self, input: str, **kwargs):
4849
"""

0 commit comments

Comments
 (0)