Skip to content

Commit

Permalink
fix: Enable pagination in the vector database to prevent the page fro…
Browse files Browse the repository at this point in the history
…m freezing when the database becomes too large. (chatchat-space#4135)
  • Loading branch information
weank1984 authored Jun 15, 2024
1 parent adcc283 commit b5d4088
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webui_pages/knowledge_base/knowledge_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ def format_selected_kb(kb_name: str) -> str:
cellEditor="agLargeTextCellEditor", cellEditorPopup=True)
gb.configure_column("to_del", "删除", editable=True, width=50, wrapHeaderText=True,
cellEditor="agCheckboxCellEditor", cellRender="agCheckboxCellRenderer")
# 启用分页
gb.configure_pagination(enabled=True, paginationAutoPageSize=False, paginationPageSize=10)
gb.configure_selection()
edit_docs = AgGrid(df, gb.build())
edit_docs = AgGrid(df, gb.build(), fit_columns_on_grid_load=True)

if st.button("保存更改"):
origin_docs = {
Expand Down

0 comments on commit b5d4088

Please sign in to comment.