import sys import streamlit as st import streamlit_antd_components as sac from chatchat import __version__ from chatchat.server.utils import api_address from chatchat.webui_pages.dialogue.dialogue import dialogue_page from chatchat.webui_pages.kb_chat import kb_chat from chatchat.webui_pages.knowledge_base.knowledge_base import knowledge_base_page from chatchat.webui_pages.utils import * api = ApiRequest(base_url=api_address()) if __name__ == "__main__": is_lite = "lite" in sys.argv # TODO: remove lite mode st.set_page_config( "Langchain-Chatchat WebUI", get_img_base64("chatchat_icon_blue_square_v2.png"), initial_sidebar_state="expanded", menu_items={ "Get Help": "https://github.com/chatchat-space/Langchain-Chatchat", "Report a bug": "https://github.com/chatchat-space/Langchain-Chatchat/issues", "About": f"""欢迎使用 Langchain-Chatchat WebUI {__version__}!""", }, layout="centered", ) # use the following code to set the app to wide mode and the html markdown to increase the sidebar width st.markdown( """