Skip to content

Commit

Permalink
fix: input node and llm node log data error
Browse files Browse the repository at this point in the history
  • Loading branch information
zgqgit committed Jan 9, 2025
1 parent c75840e commit 4a28dc1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/backend/bisheng/api/services/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def run_once(cls, login_user: UserPayload, node_input: Dict[str, any], node_data
continue
if node_data.type == NodeType.RAG.value and one['key'] != 'retrieved_result' and one['type'] != 'variable':
continue
if node_data.type == NodeType.LLM.value and not one['key'].startswith('output'):
if node_data.type == NodeType.LLM.value and one['type'] != 'variable':
continue
if node_data.type == NodeType.AGENT.value and one['type'] not in ['tool', 'variable']:
continue
Expand Down
2 changes: 1 addition & 1 deletion src/backend/bisheng/workflow/nodes/input/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _run(self, unique_id: str):

def parse_log(self, unique_id: str, result: dict) -> Any:
return [
{"key": k, "value": v, "type": "variable"} for k, v in result.items()
{"key": f'{self.id}.{k}', "value": v, "type": "variable"} for k, v in result.items()
]

def parse_upload_file(self, key: str, value: str) -> dict | None:
Expand Down
2 changes: 1 addition & 1 deletion src/backend/bisheng/workflow/nodes/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def parse_log(self, unique_id: str, result: dict) -> Any:
if self._batch_variable_list:
ret.insert(0, {"key": "batch_variable", "value": self._batch_variable_list, "type": "params"})
for k, v in result.items():
ret.append({"key": k, "value": v, "type": "variable"})
ret.append({"key": f'{self.id}.{k}', "value": v, "type": "variable"})
return ret

def _run_once(self,
Expand Down

0 comments on commit 4a28dc1

Please sign in to comment.