Skip to content

Commit

Permalink
Fix link and bump version (#294)
Browse files Browse the repository at this point in the history
* Fix readme and api version

* Address comment

* Add empty line

* Fix link

* Version bump
  • Loading branch information
moria97 authored Dec 3, 2024
1 parent c5aa45c commit 0b06cfa
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 28 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pai_rag"
version = "0.1.0"
version = "1.0.0"
description = "Open source RAG framework built on Aliyun PAI"
authors = []
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion pyproject_gpu.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pai_rag"
version = "0.1.0"
version = "1.0.0"
description = "Open source RAG framework built on Aliyun PAI"
authors = []
readme = "README.md"
Expand Down
11 changes: 0 additions & 11 deletions src/pai_rag/app/web/event_listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
LLM_MODEL_KEY_DICT,
MLLM_MODEL_KEY_DICT,
EMBEDDING_TYPE_DICT,
EMBEDDING_MODEL_LINK_DICT,
)
from pai_rag.core.rag_index_manager import RagIndexEntry
from pai_rag.integrations.embeddings.pai.pai_embedding_config import (
Expand Down Expand Up @@ -72,11 +71,6 @@ def change_emb_source(source, model):
else "Default",
visible=True if source.lower() == "huggingface" else False,
),
gr.update(
value=f"Model Introduction: [{model}]({EMBEDDING_MODEL_LINK_DICT[model]})"
if source.lower() == "huggingface"
else ""
),
gr.update(visible=True if source.lower() != "huggingface" else False),
]

Expand All @@ -92,11 +86,6 @@ def change_emb_model(source, model):
EMBEDDING_TYPE_DICT.get(model, "Default")
if source.lower() == "huggingface"
else "Default",
gr.update(
value=f"Model Introduction: [{model}]({EMBEDDING_MODEL_LINK_DICT[model]})"
if source.lower() == "huggingface"
else ""
),
)


Expand Down
8 changes: 0 additions & 8 deletions src/pai_rag/app/web/index_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
EMBEDDING_MODEL_DEPRECATED,
EMBEDDING_MODEL_LIST,
EMBEDDING_TYPE_DICT,
EMBEDDING_MODEL_LINK_DICT,
)
from pai_rag.core.rag_index_manager import RagIndexEntry
from pai_rag.integrations.index.pai.vector_store_config import (
Expand All @@ -33,7 +32,6 @@
"embed_model",
"embed_dim",
"embed_type",
"embed_link",
"embed_batch_size",
"embed_api_key",
"vectordb_type",
Expand Down Expand Up @@ -129,11 +127,6 @@ def index_to_components_settings(
else "Default",
"visible": True if embed_source == "huggingface" else False,
}
embed_link_setting = {
"value": f"Model Introduction: [{embed_model}]({EMBEDDING_MODEL_LINK_DICT[embed_model]})"
if embed_source == "huggingface"
else ""
}
embed_batch_size_setting = {"value": index_entry.embedding_config.embed_batch_size}
if index_entry.embedding_config.source.value == "huggingface":
embed_api_key_setting = {"value": "", "visible": False}
Expand All @@ -149,7 +142,6 @@ def index_to_components_settings(
embed_model_setting,
embed_dim_setting,
embed_type_setting,
embed_link_setting,
embed_batch_size_setting,
embed_api_key_setting,
]
Expand Down
9 changes: 2 additions & 7 deletions src/pai_rag/app/web/tabs/settings_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ def create_setting_tab() -> Dict[str, Any]:
visible=False,
type="password",
)
embed_link = gr.Markdown(
label="Model URL Link",
elem_id="embed_link",
)
vector_db_elems, vector_db_components = create_vector_db_panel()

add_index_button = gr.Button(
Expand All @@ -89,19 +85,18 @@ def create_setting_tab() -> Dict[str, Any]:
embed_source.input(
fn=ev_listeners.change_emb_source,
inputs=[embed_source, embed_model],
outputs=[embed_model, embed_dim, embed_type, embed_link, embed_api_key],
outputs=[embed_model, embed_dim, embed_type, embed_api_key],
)
embed_model.input(
fn=ev_listeners.change_emb_model,
inputs=[embed_source, embed_model],
outputs=[embed_dim, embed_type, embed_link],
outputs=[embed_dim, embed_type],
)
components.extend(
[
embed_source,
embed_dim,
embed_type,
embed_link,
embed_model,
embed_api_key,
embed_batch_size,
Expand Down

0 comments on commit 0b06cfa

Please sign in to comment.