fix: linting
This commit is contained in:
parent
46b2409526
commit
c5f24e7dfa
1 changed files with 4 additions and 3 deletions
|
|
@ -55,7 +55,10 @@ class PromptNode(Node):
|
|||
tools: Optional[Union[List[Node], List[ToolNode]]] = None,
|
||||
) -> Any:
|
||||
if not self._built or force:
|
||||
if "input_variables" not in self.params:
|
||||
if (
|
||||
"input_variables" not in self.params
|
||||
or self.params["input_variables"] is None
|
||||
):
|
||||
self.params["input_variables"] = []
|
||||
# Check if it is a ZeroShotPrompt and needs a tool
|
||||
if "ShotPrompt" in self.node_type:
|
||||
|
|
@ -75,8 +78,6 @@ class PromptNode(Node):
|
|||
for param in prompt_params:
|
||||
prompt_text = self.params[param]
|
||||
variables = extract_input_variables_from_prompt(prompt_text)
|
||||
if self.params["input_variables"] is None:
|
||||
self.params["input_variables"] = []
|
||||
self.params["input_variables"].extend(variables)
|
||||
self.params["input_variables"] = list(set(self.params["input_variables"]))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue