mirror of
https://github.com/Cinnamon/kotaemon.git
synced 2025-06-26 23:19:56 +00:00
fix: Remove Collections from all index names (#473)
Co-authored-by: Tadashi <tadashi@cinnamon.is>
This commit is contained in:
parent
32732c35de
commit
159f4da7c9
@ -303,7 +303,8 @@ KH_INDEX_TYPES = [
|
||||
|
||||
GRAPHRAG_INDICES = [
|
||||
{
|
||||
"name": graph_type.split(".")[-1].replace("Index", ""), # get last name
|
||||
"name": graph_type.split(".")[-1].replace("Index", "")
|
||||
+ " Collection", # get last name
|
||||
"config": {
|
||||
"supported_file_types": (
|
||||
".png, .jpeg, .jpg, .tiff, .tif, .pdf, .xls, .xlsx, .doc, .docx, "
|
||||
@ -318,7 +319,7 @@ GRAPHRAG_INDICES = [
|
||||
|
||||
KH_INDICES = [
|
||||
{
|
||||
"name": "File",
|
||||
"name": "File Collection",
|
||||
"config": {
|
||||
"supported_file_types": (
|
||||
".png, .jpeg, .jpg, .tiff, .tif, .pdf, .xls, .xlsx, .doc, .docx, "
|
||||
|
@ -84,7 +84,7 @@ class App(BaseApp):
|
||||
) as self._tabs["indices-tab"]:
|
||||
for index in self.index_manager.indices:
|
||||
with gr.Tab(
|
||||
f"{index.name} Collection",
|
||||
index.name,
|
||||
elem_id=f"{index.id}-tab",
|
||||
) as self._tabs[f"{index.id}-tab"]:
|
||||
page = index.get_index_page_ui()
|
||||
|
@ -132,9 +132,7 @@ class ChatPage(BasePage):
|
||||
continue
|
||||
|
||||
index_ui.unrender() # need to rerender later within Accordion
|
||||
with gr.Accordion(
|
||||
label=f"{index.name} Collection", open=index_id < 1
|
||||
):
|
||||
with gr.Accordion(label=index.name, open=index_id < 1):
|
||||
index_ui.render()
|
||||
gr_index = index_ui.as_gradio_component()
|
||||
|
||||
|
@ -272,7 +272,7 @@ class SettingsPage(BasePage):
|
||||
id2name = {k: v.name for k, v in self._app.index_manager.info().items()}
|
||||
with gr.Tab("Retrieval settings", visible=self._render_index_tab):
|
||||
for pn, sig in self._default_settings.index.options.items():
|
||||
name = "{} Collection".format(id2name.get(pn, f"<id {pn}>"))
|
||||
name = id2name.get(pn, f"<id {pn}>")
|
||||
with gr.Tab(name):
|
||||
for n, si in sig.settings.items():
|
||||
obj = render_setting_item(si, si.value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user