问题描述 / Problem Description
我在0.2.10中修改了一些代码,现在我在\libs\chatchat-server\chatchat\server中修改了对应的代码,但是重新启动程序后好像没有生效,请问我要怎么操作?
vjrehmav1#
我在kb_chat.py将top_k参数改成了20,但是重启之后问答还是只返回了5条,有没有大大指点一下?if mode == "local_kb": kb = KBServiceFactory.get_service_by_name(kb_name) ok, msg = kb.check_embed_model() if not ok: raise ValueError(msg) docs = await run_in_threadpool(search_docs, query=query, knowledge_base_name=kb_name, top_k=20, score_threshold=score_threshold, file_name="", metadata={}) source_documents = format_reference(kb_name, docs, api_address(is_public=True))
if mode == "local_kb": kb = KBServiceFactory.get_service_by_name(kb_name) ok, msg = kb.check_embed_model() if not ok: raise ValueError(msg) docs = await run_in_threadpool(search_docs, query=query, knowledge_base_name=kb_name, top_k=20, score_threshold=score_threshold, file_name="", metadata={}) source_documents = format_reference(kb_name, docs, api_address(is_public=True))
1条答案
按热度按时间vjrehmav1#
我在kb_chat.py将top_k参数改成了20,但是重启之后问答还是只返回了5条,有没有大大指点一下?
if mode == "local_kb": kb = KBServiceFactory.get_service_by_name(kb_name) ok, msg = kb.check_embed_model() if not ok: raise ValueError(msg) docs = await run_in_threadpool(search_docs, query=query, knowledge_base_name=kb_name, top_k=20, score_threshold=score_threshold, file_name="", metadata={}) source_documents = format_reference(kb_name, docs, api_address(is_public=True))