Skip to content

Commit

Permalink
fix categorize agent input content not format error (infiniflow#4842)
Browse files Browse the repository at this point in the history
### 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 <[email protected]>
  • Loading branch information
WANGRUI-ZB and wangrui authored Feb 11, 2025
1 parent f34b913 commit ca16480
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions agent/component/categorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit ca16480

Please sign in to comment.