Fix: input (#10386)

### What problem does this PR solve?

Fix input of some parser.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Lynn
2025-09-30 15:39:09 +08:00
committed by GitHub
parent 20b577a72c
commit b3b0be832a

View File

@ -337,14 +337,12 @@ class Parser(ProcessBase):
self.set_output("text", txt)
def _audio(self, from_upstream: ParserFromUpstream):
def _audio(self, name, blob):
import os
import tempfile
self.callback(random.randint(1, 5) / 100.0, "Start to work on an audio.")
blob = from_upstream.blob
name = from_upstream.name
conf = self._param.setups["audio"]
self.set_output("output_format", conf["output_format"])
@ -360,12 +358,9 @@ class Parser(ProcessBase):
self.set_output("text", txt)
def _email(self, from_upstream: ParserFromUpstream):
def _email(self, name, blob):
self.callback(random.randint(1, 5) / 100.0, "Start to work on an email.")
blob = from_upstream.blob
name = from_upstream.name
email_content = {}
conf = self._param.setups["email"]
target_fields = conf["fields"]