Fix: upload image files (#13071)

### What problem does this PR solve?

Fix: upload image files

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Magicbook1108
2026-02-11 09:47:33 +08:00
committed by GitHub
parent 630f05b8a1
commit 109441628b
6 changed files with 419 additions and 56 deletions

View File

@ -161,6 +161,7 @@ class ParserParam(ProcessParamBase):
"mkv",
],
"output_format": "text",
"prompt": "",
},
}
@ -685,7 +686,8 @@ class Parser(ProcessBase):
self.set_output("output_format", conf["output_format"])
cv_mdl = LLMBundle(self._canvas.get_tenant_id(), LLMType.IMAGE2TEXT, llm_name=conf["llm_id"])
txt = asyncio.run(cv_mdl.async_chat(system="", history=[], gen_conf={}, video_bytes=blob, filename=name))
video_prompt = str(conf.get("prompt", "") or "")
txt = asyncio.run(cv_mdl.async_chat(system="", history=[], gen_conf={}, video_bytes=blob, filename=name, video_prompt=video_prompt))
self.set_output("text", txt)