Skip to content

Commit

Permalink
compatible query is None
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnJyong committed Apr 3, 2024
1 parent 0026cb4 commit 85e568e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def _run(self, variable_pool: VariablePool) -> NodeRunResult:
variables = {
'query': query
}
if not query:
return NodeRunResult(
status=WorkflowNodeExecutionStatus.FAILED,
inputs=variables,
error="Query is required."
)
# retrieve knowledge
try:
results = self._fetch_dataset_retriever(
Expand Down

0 comments on commit 85e568e

Please sign in to comment.