mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-29 07:52:50 +00:00
feat: add additional context variables to document split node
This commit is contained in:
parent
8c802c3d01
commit
275e59501c
|
|
@ -85,6 +85,11 @@ class BaseDocumentSplitNode(IDocumentSplitNode):
|
|||
paragraph_list += results
|
||||
|
||||
self.context['paragraph_list'] = paragraph_list
|
||||
self.context['limit'] = limit
|
||||
self.context['chunk_size'] = chunk_size
|
||||
self.context['with_filter'] = with_filter
|
||||
self.context['patterns'] = patterns
|
||||
self.context['split_strategy'] = split_strategy
|
||||
|
||||
return NodeResult({'paragraph_list': paragraph_list}, {})
|
||||
|
||||
|
|
@ -160,4 +165,9 @@ class BaseDocumentSplitNode(IDocumentSplitNode):
|
|||
'status': self.status,
|
||||
'err_message': self.err_message,
|
||||
'paragraph_list': self.context.get('paragraph_list', []),
|
||||
'limit': self.context.get('limit'),
|
||||
'chunk_size': self.context.get('chunk_size'),
|
||||
'with_filter': self.context.get('with_filter'),
|
||||
'patterns': self.context.get('patterns'),
|
||||
'split_strategy': self.context.get('split_strategy'),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue