This commit is contained in:
wvivi2023 2024-01-05 09:58:29 +08:00
parent 76c08d4746
commit 9fc4793b79
2 changed files with 1 additions and 2 deletions

View File

@ -40,6 +40,7 @@ def search_docs(
print(f"search_docs, docs:{docs}")
data = [DocumentWithVSId(**x[0].dict(), score=x[1], id=x[0].metadata.get("id")) for x in docs]
elif file_name or metadata:
print(f"search_docs, kb:{knowledge_base_name}, filename:{file_name}")
data = kb.list_docs(file_name=file_name, metadata=metadata)
return data

View File

@ -285,7 +285,6 @@ def knowledge_base_page(api: ApiRequest, is_lite: bool = None):
st.divider()
#added by weiweiw 2024.1.3
# cols = st.columns(3)
# if cols[0].button(
@ -319,7 +318,6 @@ def knowledge_base_page(api: ApiRequest, is_lite: bool = None):
# with st.sidebar:
# keyword = st.text_input("查询关键字")
# top_k = st.slider("匹配条数", 1, 100, 3)
#ending added by weiweiw 2024.1.3
st.write("文件内文档列表。双击进行修改,在删除列填入 Y 可删除对应行。")
docs = []