feat: add api for knowledge_based QA
This commit is contained in:
parent
3eaa25c9ba
commit
5a0429b2af
|
|
@ -18,6 +18,9 @@ VECTOR_SEARCH_TOP_K = 6
|
||||||
LLM_HISTORY_LEN = 3
|
LLM_HISTORY_LEN = 3
|
||||||
|
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
>>>>>>> 7cc03c3 (feat: add api for knowledge_based QA)
|
||||||
|
|
||||||
def load_file(filepath):
|
def load_file(filepath):
|
||||||
if filepath.lower().endswith(".pdf"):
|
if filepath.lower().endswith(".pdf"):
|
||||||
|
|
@ -30,8 +33,11 @@ def load_file(filepath):
|
||||||
docs = loader.load_and_split(text_splitter=textsplitter)
|
docs = loader.load_and_split(text_splitter=textsplitter)
|
||||||
return docs
|
return docs
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
=======
|
=======
|
||||||
>>>>>>> cba44ca (修复 webui.py 中 llm_history_len 和 vector_search_top_k 显示值与启动设置默认值不一致的问题)
|
>>>>>>> cba44ca (修复 webui.py 中 llm_history_len 和 vector_search_top_k 显示值与启动设置默认值不一致的问题)
|
||||||
|
=======
|
||||||
|
>>>>>>> 7cc03c3 (feat: add api for knowledge_based QA)
|
||||||
|
|
||||||
class LocalDocQA:
|
class LocalDocQA:
|
||||||
llm: object = None
|
llm: object = None
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue