mirror of https://github.com/langgenius/dify.git
fix knowledge retriever return
This commit is contained in:
parent
b50f221327
commit
0d2a90adf3
|
|
@ -262,7 +262,8 @@ class LLMNode(BaseNode):
|
|||
:param context_dict: context dict
|
||||
:return:
|
||||
"""
|
||||
if '_source' in context_dict and context_dict['_source'] == 'knowledge':
|
||||
if ('metadata' in context_dict and '_source' in context_dict['metadata']
|
||||
and context_dict['metadata']['_source'] == 'knowledge'):
|
||||
metadata = context_dict.get('metadata', {})
|
||||
source = {
|
||||
'position': metadata.get('position'),
|
||||
|
|
|
|||
Loading…
Reference in New Issue