Skip to content

Commit

Permalink
refactor: override document extract node save_content
Browse files Browse the repository at this point in the history
  • Loading branch information
liuruibin committed Jan 23, 2025
1 parent aa184aa commit 6dca9b4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def bytes_to_uploaded_file(file_bytes, file_name="file.txt"):
splitter = '\n`-----------------------------------`\n'

class BaseDocumentExtractNode(IDocumentExtractNode):
def save_context(self, details, workflow_manage):
self.context['content'] = details.get('content')
self.answer_text = details.get('content')


def execute(self, document, chat_id, **kwargs):
get_buffer = FileBufferHandle().get_buffer

Expand Down

0 comments on commit 6dca9b4

Please sign in to comment.