Langchain-Chatchat 请问0.3.1版本要对代码进行修改,应该如何操作?

bgibtngc  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(41)

问题描述 / Problem Description

我在0.2.10中修改了一些代码,现在我在\libs\chatchat-server\chatchat\server中修改了对应的代码,但是重新启动程序后好像没有生效,请问我要怎么操作?

vjrehmav

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

相关问题