mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-07-31 00:12:00 +08:00
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 <wangrui@haima.me>
This commit is contained in:
parent
f34b913bd8
commit
ca1648052a
@ -80,6 +80,7 @@ class Categorize(Generate, ABC):
|
|||||||
|
|
||||||
def _run(self, history, **kwargs):
|
def _run(self, history, **kwargs):
|
||||||
input = self.get_input()
|
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)
|
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: "}],
|
ans = chat_mdl.chat(self._param.get_prompt(input), [{"role": "user", "content": "\nCategory: "}],
|
||||||
self._param.gen_conf())
|
self._param.gen_conf())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user