|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()) |