mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-12 21:01:56 +08:00
fix: csv_node
This commit is contained in:
parent
9fb0ff7a87
commit
b208ef792c
@ -60,7 +60,7 @@ class GenerateAnswerCSVNode(BaseNode):
|
|||||||
|
|
||||||
self.additional_info = node_config.get("additional_info")
|
self.additional_info = node_config.get("additional_info")
|
||||||
|
|
||||||
async def execute(self, state):
|
def execute(self, state):
|
||||||
"""
|
"""
|
||||||
Generates an answer by constructing a prompt from the user's input and the scraped
|
Generates an answer by constructing a prompt from the user's input and the scraped
|
||||||
content, querying the language model, and parsing its response.
|
content, querying the language model, and parsing its response.
|
||||||
@ -157,7 +157,7 @@ class GenerateAnswerCSVNode(BaseNode):
|
|||||||
)
|
)
|
||||||
|
|
||||||
merge_chain = merge_prompt | self.llm_model | output_parser
|
merge_chain = merge_prompt | self.llm_model | output_parser
|
||||||
answer = await merge_chain.ainvoke({"context": batch_results, "question": user_prompt})
|
answer = merge_chain.invoke({"context": batch_results, "question": user_prompt})
|
||||||
|
|
||||||
state.update({self.output[0]: answer})
|
state.update({self.output[0]: answer})
|
||||||
return state
|
return state
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user