mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 04:26:30 +08:00
fix knowledge single retrieve when function call response is none
This commit is contained in:
parent
8386abaed1
commit
1607fcfaa7
@ -50,11 +50,11 @@ The input text is in the variable text_field. Categories are specified as a comm
|
|||||||
DO NOT include anything other than the JSON array in your response.
|
DO NOT include anything other than the JSON array in your response.
|
||||||
### Example
|
### Example
|
||||||
Input:
|
Input:
|
||||||
{"input_text": ["I recently had a great experience with your company. The service was prompt and the staff was very friendly."],"categories": ["Customer Service, Satisfaction, Sales, Product"], "classification_instructions": ["classify the text based on the feedback provided by customer"]}
|
{{"input_text": ["I recently had a great experience with your company. The service was prompt and the staff was very friendly."],"categories": ["Customer Service, Satisfaction, Sales, Product"], "classification_instructions": ["classify the text based on the feedback provided by customer"]}}
|
||||||
{"input_text": ["bad service, slow to bring the food"],"categories": ["Food Quality, Experience, Price" ], "classification_instructions": []}
|
{{"input_text": ["bad service, slow to bring the food"],"categories": ["Food Quality, Experience, Price" ], "classification_instructions": []}}
|
||||||
Output:
|
Output:
|
||||||
{"keywords": ["recently", "great experience", "company", "service", "prompt", "staff", "friendly"],"categories": ["Customer Service"]}
|
{{"keywords": ["recently", "great experience", "company", "service", "prompt", "staff", "friendly"],"categories": ["Customer Service"]}}
|
||||||
{"keywords": ["bad service", "slow", "food", "tip", "terrible", "waitresses"],"categories": ["Experience""]}
|
{{"keywords": ["bad service", "slow", "food", "tip", "terrible", "waitresses"],"categories": ["Experience""]}}
|
||||||
### Memory
|
### Memory
|
||||||
Here is the chat histories between human and assistant, inside <histories></histories> XML tags.
|
Here is the chat histories between human and assistant, inside <histories></histories> XML tags.
|
||||||
### User Input
|
### User Input
|
||||||
|
|||||||
@ -9,4 +9,4 @@ class VariableAssignerNodeData(BaseNodeData):
|
|||||||
"""
|
"""
|
||||||
type: str = 'variable-assigner'
|
type: str = 'variable-assigner'
|
||||||
output_type: str
|
output_type: str
|
||||||
variables: list[str]
|
variables: list[list[str]]
|
||||||
|
|||||||
@ -14,15 +14,19 @@ class VariableAssignerNode(BaseNode):
|
|||||||
|
|
||||||
def _run(self, variable_pool: VariablePool) -> NodeRunResult:
|
def _run(self, variable_pool: VariablePool) -> NodeRunResult:
|
||||||
node_data: VariableAssignerNodeData = cast(self._node_data_cls, self.node_data)
|
node_data: VariableAssignerNodeData = cast(self._node_data_cls, self.node_data)
|
||||||
value = variable_pool.get_variable_value(node_data.variables)
|
outputs = {}
|
||||||
variable_pool.append_variable(
|
for variable in node_data.variables:
|
||||||
node_id=self.node_id,
|
value = variable_pool.get_variable_value(variable)
|
||||||
variable_key_list=node_data.variables,
|
if value:
|
||||||
value=value
|
variable_pool.append_variable(
|
||||||
)
|
node_id=self.node_id,
|
||||||
outputs = {
|
variable_key_list=variable,
|
||||||
"output": value
|
value=value
|
||||||
}
|
)
|
||||||
|
outputs = {
|
||||||
|
"output": value
|
||||||
|
}
|
||||||
|
break
|
||||||
|
|
||||||
return NodeRunResult(
|
return NodeRunResult(
|
||||||
status=WorkflowNodeExecutionStatus.SUCCEEDED,
|
status=WorkflowNodeExecutionStatus.SUCCEEDED,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user