From ca1648052a02abb941f3427ac6408e99cf501ad2 Mon Sep 17 00:00:00 2001 From: WANGRUI-ZB <50860994+WANGRUI-ZB@users.noreply.github.com> Date: Tue, 11 Feb 2025 13:32:42 +0800 Subject: [PATCH] fix categorize agent input content not format error (#4842) ### What problem does this PR solve? Fix categorize agent input content not format error ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: wangrui --- agent/component/categorize.py | 1 + 1 file changed, 1 insertion(+) diff --git a/agent/component/categorize.py b/agent/component/categorize.py index 03385a0ba..efbbf0aa0 100644 --- a/agent/component/categorize.py +++ b/agent/component/categorize.py @@ -80,6 +80,7 @@ class Categorize(Generate, ABC): def _run(self, history, **kwargs): input = self.get_input() + input = " - ".join(input["content"]) if "content" in input else "" chat_mdl = LLMBundle(self._canvas.get_tenant_id(), LLMType.CHAT, self._param.llm_id) ans = chat_mdl.chat(self._param.get_prompt(input), [{"role": "user", "content": "\nCategory: "}], self._param.gen_conf())