code: import streamlit as st
  import sqlite3
  import streamlit_antd_components as sac
  import pandas as pd
  import os
  from langchain.embeddings.openai import OpenAIEmbeddings
  from langchain.document_loaders import UnstructuredFileLoader
  from langchain.text_splitter import CharacterTextSplitter
  from langchain.vectorstores import LanceDB
  import lancedb
  import pickle
  import configparser
  import ast
  
  class ConfigHandler:
      def __init__(self):
          self.config = configparser.ConfigParser()
          self.config.read('config.ini')
  
      def get_config_values(self, section, key):
          value = self.config.get(section, key)
          try:
              # Try converting the string value to a Python data structure
              return ast.literal_eval(value)
          except (SyntaxError, ValueError):
              # If not a data structure, return the plain string
              return value
  		
  config_handler = ConfigHandler()
  PM = config_handler.get_config_values('constants', 'PM')
  USERS = config_handler.get_config_values('constants', 'USERS')
  SA = config_handler.get_config_values('constants', 'SA')
  AD = config_handler.get_config_values('constants', 'AD')
  
  
  # Create or check for the 'database' directory in the current working directory
  cwd = os.getcwd()
  WORKING_DIRECTORY = os.path.join(cwd, "database")
  
  if not os.path.exists(WORKING_DIRECTORY):
  	os.makedirs(WORKING_DIRECTORY)
  
  if st.secrets["sql_ext_path"] == "None":
  	WORKING_DATABASE= os.path.join(WORKING_DIRECTORY , st.secrets["default_db"])
  else:
  	WORKING_DATABASE= st.secrets["sql_ext_path"]
  
  def fetch_vectorstores_with_usernames():
      conn = sqlite3.connect(WORKING_DATABASE)
      cursor = conn.cursor()
      
      query = '''
      SELECT 
          Vector_Stores.vs_id, 
          Subject.subject_name,
          Topic.topic_name, 
          Vector_Stores.vectorstore_name, 
          Users.username, 
          Vector_Stores.sharing_enabled
      FROM Vector_Stores
      JOIN Users ON Vector_Stores.user_id = Users.user_id
      LEFT JOIN Subject ON Vector_Stores.subject = Subject.id
      LEFT JOIN Topic ON Vector_Stores.topic = Topic.id;
      '''
      
      cursor.execute(query)
      data = cursor.fetchall()
      conn.close()
      return data
  
  def display_vectorstores():
      data = fetch_vectorstores_with_usernames()
      df = pd.DataFrame(data, columns=["KB ID", "Function Name", "Process Name", "KB Name", "Username", "sharing_enabled"])
  
      # Convert the 'sharing_enabled' values
      df["sharing_enabled"] = df["sharing_enabled"].apply(lambda x: '✔' if x == 1 else '')
  
      st.dataframe(
          df, 
          use_container_width=True,
          column_order=["KB ID", "Function Name", "Process Name", "KB Name", "Username", "sharing_enabled"]
      )
  
  def fetch_all_files():
      """
      Fetch all files either shared or based on user type
      """
      conn = sqlite3.connect(WORKING_DATABASE)
      cursor = conn.cursor()
      
      # Construct the SQL query with JOINs for Subject, Topic, and Users tables
      if st.session_state.user['profile_id'] == 'SA':
          cursor.execute('''
              SELECT Files.file_id, Files.file_name, Subject.subject_name, Topic.topic_name, Users.username 
              FROM Files 
              JOIN Subject ON Files.subject = Subject.id 
              JOIN Topic ON Files.topic = Topic.id 
              JOIN Users ON Files.user_id = Users.user_id
          ''')
      else:
          cursor.execute('''
              SELECT Files.file_id, Files.file_name, Subject.subject_name, Topic.topic_name, Users.username 
              FROM Files 
              JOIN Subject ON Files.subject = Subject.id 
              JOIN Topic ON Files.topic = Topic.id 
              JOIN Users ON Files.user_id = Users.user_id 
              WHERE Files.sharing_enabled = 1
          ''')
      
      files = cursor.fetchall()
      formatted_files = [f"({file[0]}) {file[1]} ({file[4]})" for file in files]
      
      conn.close()
      return formatted_files
  
  
  def fetch_file_data(file_id):
      """
      Fetch file data given a file id
      """
      conn = sqlite3.connect(WORKING_DATABASE)
      cursor = conn.cursor()
      
      cursor.execute("SELECT data, metadata FROM Files WHERE file_id = ?", (file_id,))
      data = cursor.fetchone()
  
      conn.close()
      if data:
          return data[0], data[1]
      else:
          return None, None
  
  def fetch_subjects_by_org(org_id):
      conn = sqlite3.connect(WORKING_DATABASE)
      cursor = conn.cursor()
  
      # Check if the user is a super_admin (org_id is 0)
      if org_id == 0:
          cursor.execute('SELECT * FROM Subject;')
      else:
          cursor.execute('SELECT * FROM Subject WHERE org_id = ?;', (org_id,))
      
      subjects = cursor.fetchall()
      conn.close()
      return subjects
  
  
  def fetch_topics_by_org(org_id):
      conn = sqlite3.connect(WORKING_DATABASE)
      cursor = conn.cursor()
  
      # Check if the user is a super_admin (org_id is 0)
      if org_id == 0:
          cursor.execute('SELECT * FROM Topic;')
      else:
          cursor.execute('SELECT * FROM Topic WHERE org_id = ?;', (org_id,))
      
      topics = cursor.fetchall()
      conn.close()
      return topics
  
  def split_docs(file_path,meta):
  #def split_meta_docs(file, source, tch_code):
  	loader = UnstructuredFileLoader(file_path)
  	documents = loader.load()
  	text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
  	docs = text_splitter.split_documents(documents)
  	metadata = {"source": meta}
  	for doc in docs:
  		doc.metadata.update(metadata)
  	return docs
  
  def create_lancedb_table(embeddings, meta, table_name):
  	lancedb_path = os.path.join(WORKING_DIRECTORY, "lancedb")
  	# LanceDB connection
  	db = lancedb.connect(lancedb_path)
  	table = db.create_table(
  		f"{table_name}",
  		data=[
  			{
  				"vector": embeddings.embed_query("Query Unsuccessful"),
  				"text": "Query Unsuccessful",
  				"id": "1",
  				"source": f"{meta}"
  			}
  		],
  		mode="overwrite",	
  	)
  	return table
  
  def save_to_vectorstores(vs, vstore_input_name, subject, topic, username, share_resource=False):
      conn = sqlite3.connect(WORKING_DATABASE)
      cursor = conn.cursor()
  
      # Fetch the user's details
      cursor.execute('SELECT user_id FROM Users WHERE username = ?', (username,))
      user_details = cursor.fetchone()
  
      if not user_details:
          st.error("Error: User not found.")
          return
  
      user_id = user_details[0]
  
      # If Vector_Store instance exists in session state, then serialize and save
      if vs:
          serialized_db = pickle.dumps(vs)
  
          # Check if the entry already exists
          cursor.execute('SELECT 1 FROM Vector_Stores WHERE vectorstore_name LIKE ? AND user_id = ?', (f"%{vstore_input_name}%", user_id))
          exists = cursor.fetchone()
  
          if exists:
              st.error("Error: An entry with the same vectorstore_name and user_id already exists.")
              return
          
          if subject is None:
              st.error("Error: Function is missing.")
              return
  
          if topic is None:
              st.error("Error: Process is missing.")
              return
  
          # Get the subject and topic IDs
          cursor.execute('SELECT id FROM Subject WHERE subject_name = ?', (subject,))
          subject_id = cursor.fetchone()[0]
  
          cursor.execute('SELECT id FROM Topic WHERE topic_name = ?', (topic,))
          topic_id = cursor.fetchone()[0]
  
          # Insert the new row
          cursor.execute('''
          INSERT INTO Vector_Stores (vectorstore_name, data, user_id, subject, topic, sharing_enabled)
          VALUES (?, ?, ?, ?, ?, ?)
      ''', (vstore_input_name, serialized_db, user_id, subject_id, topic_id, share_resource))
  
          conn.commit()
  
          
  
      conn.close()
  
  def create_vectorstore():
      full_docs = []
      st.subheader("Enter the process and functions for your knowledge base")
      embeddings = OpenAIEmbeddings()
  
      # Fetch all available subjects
      subjects = fetch_subjects_by_org(st.session_state.user["org_id"])
      subject_names = [sub[2] for sub in subjects]  # Assuming index 2 holds the subject_name
      selected_subject = st.selectbox("Select an existing function or type a new one:", options=subject_names + ['New Function'])
      
      if selected_subject == 'New Function':
          subject = st.text_input("Please enter the new function name:", max_chars=30)
      else:
          subject = selected_subject
  
      # Fetch all available topics
      topics = fetch_topics_by_org(st.session_state.user["org_id"])
      topic_names = [topic[2] for topic in topics]  # Assuming index 2 holds the topic_name
      selected_topic = st.selectbox("Select an existing process or type a new one:", options=topic_names + ['New Process'])
      
      if selected_topic == 'New Process':
          topic = st.text_input("Please enter the new process name:", max_chars=30)
      else:
          topic = selected_topic
      
      vectorstore_input = st.text_input("Please type in a name for your knowledge base:", max_chars=20)
      vs_name = vectorstore_input + f"_({st.session_state.user['username']})"
      share_resource = st.checkbox("Share this resource", value=True)  # <-- Added this line
  
      # Show the current build of files for the latest database
      st.subheader("Select one or more files to build your knowledge base")
      files = fetch_all_files()
      if files:
          selected_files = sac.transfer(items=files, label=None, index=None, titles=['Uploaded files', 'Select files for KB'], format_func='title', width='100%', height=None, search=True, pagination=False, oneway=False, reload=True, disabled=False, return_index=False)
          
          # Alert to confirm the creation of knowledge base
          st.warning("Building your knowledge base will take some time. Please be patient.")
          
          build = sac.buttons([
              dict(label='Build VectorStore', icon='check-circle-fill', color = 'green'),
              dict(label='Cancel', icon='x-circle-fill', color='red'),
          ], label=None, index=1, format_func='title', align='center', position='top', size='default', direction='horizontal', shape='round', type='default', compact=False, return_index=False)
          
          if build == 'Build VectorStore' and selected_files:
              for s_file in selected_files:
                  file_id = int(s_file.split("(", 1)[1].split(")", 1)[0])
                  file_data, meta = fetch_file_data(file_id)
                  docs = split_docs(file_data, meta)
                  full_docs.extend(docs)
          
              
              db = LanceDB.from_documents(full_docs, OpenAIEmbeddings(), connection=create_lancedb_table(embeddings, meta, vs_name)) 
              save_to_vectorstores(db, vs_name, subject, topic, st.session_state.user["username"], share_resource)  # Passing the share_resource to the function
              st.success("Knowledge Base loaded")
  
      else:
          st.write("No files found in the database.")
  
  
  def delete_lancedb_table(table_name):
  	lancedb_path = os.path.join(WORKING_DIRECTORY, "lancedb")
  	# LanceDB connection
  	db = lancedb.connect(lancedb_path)
  	db.drop_table(f"{table_name}")
  
  def fetch_vectorstores_by_user_id(user_id):
      conn = sqlite3.connect(WORKING_DATABASE)
      cursor = conn.cursor()
      
      # Fetch vectorstores based on user_id
      cursor.execute('SELECT vectorstore_name FROM Vector_Stores WHERE user_id = ?;', (user_id,))
      
      vectorstores = cursor.fetchall()
      conn.close()
      return vectorstores
  
  def delete_vectorstores():
      st.subheader("Delete Knowledge Base in Database:")
      user_vectorstores = fetch_vectorstores_by_user_id(st.session_state.user["id"])
      
      if user_vectorstores:
          vectorstore_names = [vs[0] for vs in user_vectorstores]
          selected_vectorstores = st.multiselect("Select knowledge bases to delete:", options=vectorstore_names)
          confirm_delete = st.checkbox("I understand that this action cannot be undone.", value=False)
          
          if st.button("Delete VectorStore"):
              if confirm_delete and selected_vectorstores:
                  delete_vectorstores_from_db(selected_vectorstores, st.session_state.user["id"], st.session_state.user["profile_id"])
                  st.success(f"Deleted {len(selected_vectorstores)} vectorstores.")
              else:
                  st.warning("Please confirm the deletion action.")
      else:
          st.write("No knowledge base found in the database.")
  
  def delete_vectorstores_from_db(vectorstore_names, user_id, profile):
      conn = sqlite3.connect(WORKING_DATABASE)
      cursor = conn.cursor()
  
      for vectorstore_name in vectorstore_names:
          if profile in ['SA', 'AD']:
              # Delete the corresponding LanceDB table
              delete_lancedb_table(vectorstore_name)
              
              # Delete vectorstore irrespective of the user_id associated with them
              cursor.execute('DELETE FROM Vector_Stores WHERE vectorstore_name=?;', (vectorstore_name,))
          else:
              # Delete the corresponding LanceDB table
              delete_lancedb_table(vectorstore_name)
              
              # Delete only if the user_id matches
              cursor.execute('DELETE FROM Vector_Stores WHERE vectorstore_name=? AND user_id=?;', (vectorstore_name, user_id))
              
              # Check if the row was affected
              if cursor.rowcount == 0:
                  st.error(f"Unable to delete knowledge base '{vectorstore_name}' that is not owned by you.")
                  
      conn.commit()  # Commit the changes
      conn.close()  # Close the connection
  
apis: lancedb.connect
extract_api: [((1234, 1245), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1243, 1245), False, 'import os\n'), ((1266, 1295), 'os.path.join', 'os.path.join', (['cwd', '"""database"""'], {}), "(cwd, 'database')\n", (1278, 1295), False, 'import os\n'), ((1304, 1337), 'os.path.exists', 'os.path.exists', (['WORKING_DIRECTORY'], {}), '(WORKING_DIRECTORY)\n', (1318, 1337), False, 'import os\n'), ((1340, 1370), 'os.makedirs', 'os.makedirs', (['WORKING_DIRECTORY'], {}), '(WORKING_DIRECTORY)\n', (1351, 1370), False, 'import os\n'), ((1432, 1489), 'os.path.join', 'os.path.join', (['WORKING_DIRECTORY', "st.secrets['default_db']"], {}), "(WORKING_DIRECTORY, st.secrets['default_db'])\n", (1444, 1489), False, 'import os\n'), ((1596, 1629), 'sqlite3.connect', 'sqlite3.connect', (['WORKING_DATABASE'], {}), '(WORKING_DATABASE)\n', (1611, 1629), False, 'import sqlite3\n'), ((2261, 2377), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {'columns': "['KB ID', 'Function Name', 'Process Name', 'KB Name', 'Username',\n    'sharing_enabled']"}), "(data, columns=['KB ID', 'Function Name', 'Process Name',\n    'KB Name', 'Username', 'sharing_enabled'])\n", (2273, 2377), True, 'import pandas as pd\n'), ((2512, 2657), 'streamlit.dataframe', 'st.dataframe', (['df'], {'use_container_width': '(True)', 'column_order': "['KB ID', 'Function Name', 'Process Name', 'KB Name', 'Username',\n    'sharing_enabled']"}), "(df, use_container_width=True, column_order=['KB ID',\n    'Function Name', 'Process Name', 'KB Name', 'Username', 'sharing_enabled'])\n", (2524, 2657), True, 'import streamlit as st\n'), ((2792, 2825), 'sqlite3.connect', 'sqlite3.connect', (['WORKING_DATABASE'], {}), '(WORKING_DATABASE)\n', (2807, 2825), False, 'import sqlite3\n'), ((3967, 4000), 'sqlite3.connect', 'sqlite3.connect', (['WORKING_DATABASE'], {}), '(WORKING_DATABASE)\n', (3982, 4000), False, 'import sqlite3\n'), ((4293, 4326), 'sqlite3.connect', 'sqlite3.connect', (['WORKING_DATABASE'], {}), '(WORKING_DATABASE)\n', (4308, 4326), False, 'import sqlite3\n'), ((4687, 4720), 'sqlite3.connect', 'sqlite3.connect', (['WORKING_DATABASE'], {}), '(WORKING_DATABASE)\n', (4702, 4720), False, 'import sqlite3\n'), ((5116, 5149), 'langchain.document_loaders.UnstructuredFileLoader', 'UnstructuredFileLoader', (['file_path'], {}), '(file_path)\n', (5138, 5149), False, 'from langchain.document_loaders import UnstructuredFileLoader\n'), ((5194, 5249), 'langchain.text_splitter.CharacterTextSplitter', 'CharacterTextSplitter', ([], {'chunk_size': '(1000)', 'chunk_overlap': '(0)'}), '(chunk_size=1000, chunk_overlap=0)\n', (5215, 5249), False, 'from langchain.text_splitter import CharacterTextSplitter\n'), ((5464, 5506), 'os.path.join', 'os.path.join', (['WORKING_DIRECTORY', '"""lancedb"""'], {}), "(WORKING_DIRECTORY, 'lancedb')\n", (5476, 5506), False, 'import os\n'), ((5535, 5564), 'lancedb.connect', 'lancedb.connect', (['lancedb_path'], {}), '(lancedb_path)\n', (5550, 5564), False, 'import lancedb\n'), ((5914, 5947), 'sqlite3.connect', 'sqlite3.connect', (['WORKING_DATABASE'], {}), '(WORKING_DATABASE)\n', (5929, 5947), False, 'import sqlite3\n'), ((7603, 7674), 'streamlit.subheader', 'st.subheader', (['"""Enter the process and functions for your knowledge base"""'], {}), "('Enter the process and functions for your knowledge base')\n", (7615, 7674), True, 'import streamlit as st\n'), ((7692, 7710), 'langchain.embeddings.openai.OpenAIEmbeddings', 'OpenAIEmbeddings', ([], {}), '()\n', (7708, 7710), False, 'from langchain.embeddings.openai import OpenAIEmbeddings\n'), ((7932, 8041), 'streamlit.selectbox', 'st.selectbox', (['"""Select an existing function or type a new one:"""'], {'options': "(subject_names + ['New Function'])"}), "('Select an existing function or type a new one:', options=\n    subject_names + ['New Function'])\n", (7944, 8041), True, 'import streamlit as st\n'), ((8426, 8531), 'streamlit.selectbox', 'st.selectbox', (['"""Select an existing process or type a new one:"""'], {'options': "(topic_names + ['New Process'])"}), "('Select an existing process or type a new one:', options=\n    topic_names + ['New Process'])\n", (8438, 8531), True, 'import streamlit as st\n'), ((8724, 8801), 'streamlit.text_input', 'st.text_input', (['"""Please type in a name for your knowledge base:"""'], {'max_chars': '(20)'}), "('Please type in a name for your knowledge base:', max_chars=20)\n", (8737, 8801), True, 'import streamlit as st\n'), ((8899, 8945), 'streamlit.checkbox', 'st.checkbox', (['"""Share this resource"""'], {'value': '(True)'}), "('Share this resource', value=True)\n", (8910, 8945), True, 'import streamlit as st\n'), ((9036, 9105), 'streamlit.subheader', 'st.subheader', (['"""Select one or more files to build your knowledge base"""'], {}), "('Select one or more files to build your knowledge base')\n", (9048, 9105), True, 'import streamlit as st\n'), ((10774, 10816), 'os.path.join', 'os.path.join', (['WORKING_DIRECTORY', '"""lancedb"""'], {}), "(WORKING_DIRECTORY, 'lancedb')\n", (10786, 10816), False, 'import os\n'), ((10845, 10874), 'lancedb.connect', 'lancedb.connect', (['lancedb_path'], {}), '(lancedb_path)\n', (10860, 10874), False, 'import lancedb\n'), ((10963, 10996), 'sqlite3.connect', 'sqlite3.connect', (['WORKING_DATABASE'], {}), '(WORKING_DATABASE)\n', (10978, 10996), False, 'import sqlite3\n'), ((11282, 11332), 'streamlit.subheader', 'st.subheader', (['"""Delete Knowledge Base in Database:"""'], {}), "('Delete Knowledge Base in Database:')\n", (11294, 11332), True, 'import streamlit as st\n'), ((12285, 12318), 'sqlite3.connect', 'sqlite3.connect', (['WORKING_DATABASE'], {}), '(WORKING_DATABASE)\n', (12300, 12318), False, 'import sqlite3\n'), ((456, 483), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (481, 483), False, 'import configparser\n'), ((6158, 6192), 'streamlit.error', 'st.error', (['"""Error: User not found."""'], {}), "('Error: User not found.')\n", (6166, 6192), True, 'import streamlit as st\n'), ((6355, 6371), 'pickle.dumps', 'pickle.dumps', (['vs'], {}), '(vs)\n', (6367, 6371), False, 'import pickle\n'), ((8103, 8169), 'streamlit.text_input', 'st.text_input', (['"""Please enter the new function name:"""'], {'max_chars': '(30)'}), "('Please enter the new function name:', max_chars=30)\n", (8116, 8169), True, 'import streamlit as st\n'), ((8588, 8653), 'streamlit.text_input', 'st.text_input', (['"""Please enter the new process name:"""'], {'max_chars': '(30)'}), "('Please enter the new process name:', max_chars=30)\n", (8601, 8653), True, 'import streamlit as st\n'), ((9175, 9429), 'streamlit_antd_components.transfer', 'sac.transfer', ([], {'items': 'files', 'label': 'None', 'index': 'None', 'titles': "['Uploaded files', 'Select files for KB']", 'format_func': '"""title"""', 'width': '"""100%"""', 'height': 'None', 'search': '(True)', 'pagination': '(False)', 'oneway': '(False)', 'reload': '(True)', 'disabled': '(False)', 'return_index': '(False)'}), "(items=files, label=None, index=None, titles=['Uploaded files',\n    'Select files for KB'], format_func='title', width='100%', height=None,\n    search=True, pagination=False, oneway=False, reload=True, disabled=\n    False, return_index=False)\n", (9187, 9429), True, 'import streamlit_antd_components as sac\n'), ((9492, 9579), 'streamlit.warning', 'st.warning', (['"""Building your knowledge base will take some time. Please be patient."""'], {}), "(\n    'Building your knowledge base will take some time. Please be patient.')\n", (9502, 9579), True, 'import streamlit as st\n'), ((10674, 10717), 'streamlit.write', 'st.write', (['"""No files found in the database."""'], {}), "('No files found in the database.')\n", (10682, 10717), True, 'import streamlit as st\n'), ((11543, 11621), 'streamlit.multiselect', 'st.multiselect', (['"""Select knowledge bases to delete:"""'], {'options': 'vectorstore_names'}), "('Select knowledge bases to delete:', options=vectorstore_names)\n", (11557, 11621), True, 'import streamlit as st\n'), ((11647, 11722), 'streamlit.checkbox', 'st.checkbox', (['"""I understand that this action cannot be undone."""'], {'value': '(False)'}), "('I understand that this action cannot be undone.', value=False)\n", (11658, 11722), True, 'import streamlit as st\n'), ((11743, 11774), 'streamlit.button', 'st.button', (['"""Delete VectorStore"""'], {}), "('Delete VectorStore')\n", (11752, 11774), True, 'import streamlit as st\n'), ((12150, 12202), 'streamlit.write', 'st.write', (['"""No knowledge base found in the database."""'], {}), "('No knowledge base found in the database.')\n", (12158, 12202), True, 'import streamlit as st\n'), ((722, 745), 'ast.literal_eval', 'ast.literal_eval', (['value'], {}), '(value)\n', (738, 745), False, 'import ast\n'), ((6621, 6717), 'streamlit.error', 'st.error', (['"""Error: An entry with the same vectorstore_name and user_id already exists."""'], {}), "(\n    'Error: An entry with the same vectorstore_name and user_id already exists.'\n    )\n", (6629, 6717), True, 'import streamlit as st\n'), ((6776, 6815), 'streamlit.error', 'st.error', (['"""Error: Function is missing."""'], {}), "('Error: Function is missing.')\n", (6784, 6815), True, 'import streamlit as st\n'), ((6874, 6912), 'streamlit.error', 'st.error', (['"""Error: Process is missing."""'], {}), "('Error: Process is missing.')\n", (6882, 6912), True, 'import streamlit as st\n'), ((10619, 10654), 'streamlit.success', 'st.success', (['"""Knowledge Base loaded"""'], {}), "('Knowledge Base loaded')\n", (10629, 10654), True, 'import streamlit as st\n'), ((10367, 10385), 'langchain.embeddings.openai.OpenAIEmbeddings', 'OpenAIEmbeddings', ([], {}), '()\n', (10383, 10385), False, 'from langchain.embeddings.openai import OpenAIEmbeddings\n'), ((12082, 12131), 'streamlit.warning', 'st.warning', (['"""Please confirm the deletion action."""'], {}), "('Please confirm the deletion action.')\n", (12092, 12131), True, 'import streamlit as st\n'), ((13147, 13248), 'streamlit.error', 'st.error', (['f"""Unable to delete knowledge base \'{vectorstore_name}\' that is not owned by you."""'], {}), '(\n    f"Unable to delete knowledge base \'{vectorstore_name}\' that is not owned by you."\n    )\n', (13155, 13248), True, 'import streamlit as st\n')]