import streamlit as st # from chatchat.webui_pages.loom_view_client import update_store # from chatchat.webui_pages.openai_plugins import openai_plugins_page from chatchat.webui_pages.utils import * from streamlit_option_menu import option_menu from chatchat.webui_pages.dialogue.dialogue import dialogue_page, chat_box from chatchat.webui_pages.knowledge_base.knowledge_base import knowledge_base_page import os import sys from chatchat.configs import VERSION from chatchat.server.utils import api_address # def on_change(key): # if key: # update_store() img_dir = os.path.dirname(os.path.abspath(__file__)) api = ApiRequest(base_url=api_address()) if __name__ == "__main__": is_lite = "lite" in sys.argv st.set_page_config( "Langchain-Chatchat WebUI", os.path.join(img_dir, "img", "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="wide" ) # use the following code to set the app to wide mode and the html markdown to increase the sidebar width st.markdown( """