8
8
# Imports from Langchain
9
9
from langchain .prompts import PromptTemplate
10
10
from langchain_core .output_parsers import JsonOutputParser
11
- from langchain_core .runnables import RunnableParallel
12
11
from tqdm import tqdm
13
-
14
-
15
- from ..utils .logging import get_logger
16
12
from ..models import Ollama
17
- # Imports from the library
18
13
from .base_node import BaseNode
19
- from ..helpers import template_chunks , template_no_chunks , template_merge
20
14
21
15
22
16
class MergeExploreGraphsNode (BaseNode ):
@@ -42,10 +36,10 @@ def __init__(
42
36
input : str ,
43
37
output : List [str ],
44
38
node_config : Optional [dict ] = None ,
45
- node_name : str = "GenerateAnswer " ,
39
+ node_name : str = "MergeExploreGraph " ,
46
40
):
47
41
super ().__init__ (node_name , "node" , input , output , 2 , node_config )
48
-
42
+
49
43
self .llm_model = node_config ["llm_model" ]
50
44
51
45
if isinstance (node_config ["llm_model" ], Ollama ):
@@ -74,6 +68,20 @@ def execute(self, state: dict) -> dict:
74
68
75
69
self .logger .info (f"--- Executing { self .node_name } Node ---" )
76
70
77
-
78
- state .update ({self .output [0 ]: "answaer" })
71
+ template_answer = ""
72
+
73
+ answers = str (state .get ("answer" ))
74
+ relevant_links = str (state .get ("relevant_links" ))
75
+ answer = {}
76
+
77
+ merge_prompt = PromptTemplate (
78
+ template = template_answer ,
79
+ #input_variables=["context", "question"],
80
+ #partial_variables={"format_instructions": format_instructions},
81
+ )
82
+
83
+ #answer = merge_prompt.invoke({"question": user_prompt})
84
+
85
+ state .update ({"relevant_links" : "TODO" })
86
+ state .update ({"answer" : "TODO" })
79
87
return state
0 commit comments