소스 검색

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>
tags/v0.17.0
WANGRUI-ZB 8 달 전
부모
커밋
ca1648052a
No account linked to committer's email address
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      agent/component/categorize.py

+ 1
- 0
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())

Loading…
취소
저장