fix: fix unit test error (#2085)

Co-authored-by: aries_ckt <916701291@qq.com>
Co-authored-by: Appointat <kuda.czk@antgroup.com>
This commit is contained in:
Florian
2024-10-22 09:35:51 +08:00
committed by GitHub
parent 6d6667812b
commit d9e20426fe
11 changed files with 129 additions and 113 deletions

View File

@@ -88,7 +88,8 @@ def __create_community_kg_connector():
async def ask_chunk(chunk: Chunk, question) -> str:
rag_template = (
"Based on the following [Context] {context}, " "answer [Question] {question}."
"Based on the following [Context] {context}, "
"answer [Question] {question}."
)
template = HumanPromptTemplate.from_template(rag_template)
messages = template.format_messages(context=chunk.content, question=question)