@@ -29,12 +29,13 @@ class MergeAnswersNode(BaseNode):
2929 node_name (str): The unique identifier name for the node, defaulting to "GenerateAnswer".
3030 """
3131
32- def __init__ (self , input : str , output : List [str ], node_config : Optional [dict ]= None ,
32+ def __init__ (self , input : str , output : List [str ], node_config : Optional [dict ] = None ,
3333 node_name : str = "MergeAnswers" ):
3434 super ().__init__ (node_name , "node" , input , output , 2 , node_config )
35-
35+
3636 self .llm_model = node_config ["llm_model" ]
37- self .verbose = True if node_config is None else node_config .get ("verbose" , False )
37+ self .verbose = True if node_config is None else node_config .get (
38+ "verbose" , False )
3839
3940 def execute (self , state : dict ) -> dict :
4041 """
@@ -63,12 +64,12 @@ def execute(self, state: dict) -> dict:
6364
6465 user_prompt = input_data [0 ]
6566 answers = input_data [1 ]
66-
67+
6768 # merge the answers in one string
6869 answers_str = ""
6970 for i , answer in enumerate (answers ):
7071 answers_str += f"CONTENT WEBSITE { i + 1 } : { answer } \n "
71-
72+
7273 output_parser = JsonOutputParser ()
7374 format_instructions = output_parser .get_format_instructions ()
7475
@@ -79,7 +80,7 @@ def execute(self, state: dict) -> dict:
7980 The scraped contents are in a JSON format and you need to merge them based on the context and providing a correct JSON structure.\n
8081 OUTPUT INSTRUCTIONS: {format_instructions}\n
8182 USER PROMPT: {user_prompt}\n
82- {website_content}
83+ WEBSITE CONTENT: {website_content}
8384 """
8485
8586 prompt_template = PromptTemplate (
0 commit comments