Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set default embedding & llm #58

Merged
merged 8 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Build and push base image
env:
IMAGE_TAG: 0.0.1
IMAGE_TAG: 0.0.2
run: |
docker build -t ${{ env.REGISTRY }}/mybigpai/pairag:$IMAGE_TAG .
docker tag ${{ env.REGISTRY }}/mybigpai/pairag:$IMAGE_TAG ${{ env.REGISTRY_HZ }}/mybigpai/pairag:$IMAGE_TAG
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Build and push GPU image
env:
IMAGE_TAG: 0.0.1_gpu
IMAGE_TAG: 0.0.2_gpu
run: |
docker build -t ${{ env.REGISTRY }}/mybigpai/pairag:$IMAGE_TAG -f Dockerfile_gpu .
docker tag ${{ env.REGISTRY }}/mybigpai/pairag:$IMAGE_TAG ${{ env.REGISTRY_HZ }}/mybigpai/pairag:$IMAGE_TAG
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
env:
DASHSCOPE_API_KEY: ${{ secrets.TESTDASHSCOPEKEY }}
IS_PAI_RAG_CI_TEST: true
PAIRAG_RAG__embedding__source: "DashScope"
PAIRAG_RAG__llm__source: "DashScope"
PAIRAG_RAG__llm__name: "qwen-turbo"

- name: Get Cover
uses: orgoro/coverage@v3.1
Expand Down
6 changes: 3 additions & 3 deletions src/pai_rag/app/web/tabs/vector_db_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def create_vector_db_panel(
label="Table",
elem_id="hologres_table",
)
hologres_pre_delete = gr.Dropdown(
["True", "False"],
label="Pre Delete",
hologres_pre_delete = gr.Checkbox(
label="Yes",
info="Clear hologres table on connection.",
elem_id="hologres_pre_delete",
)

Expand Down
2 changes: 1 addition & 1 deletion src/pai_rag/app/web/view_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ViewModel(BaseModel):
llm: str = "PaiEas"
llm_eas_url: str = None
llm_eas_token: str = None
llm_eas_model_name: str = None
llm_eas_model_name: str = "PAI-EAS-LLM"
llm_api_key: str = None
llm_api_model_name: str = None
llm_temperature: float = 0.1
Expand Down
8 changes: 5 additions & 3 deletions src/pai_rag/config/settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ persist_path = "localdata/storage"
type = "SimpleDirectoryReader"

[rag.embedding]
source = "DashScope"
source = "HuggingFace"
model_name = "bge-small-zh-v1.5"

[rag.evaluation]
retrieval = ["mrr", "hit_rate"]
Expand All @@ -32,8 +33,9 @@ persist_path = "localdata/storage"
vector_store.type = "FAISS"

[rag.llm]
source = "DashScope"
name = "qwen-turbo"
source = "PaiEas"
endpoint = ""
token = ""

[rag.llm_chat_engine]
type = "SimpleChatEngine"
Expand Down
2 changes: 1 addition & 1 deletion src/pai_rag/modules/llm/llm_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _create_new_instance(self, new_params: Dict[str, Any]):
model_name=model_name, temperature=config.get("temperature", 0.1)
)
elif source == "paieas":
model_name = config["name"]
model_name = config.get("name", "PAI-EAS-LLM")
endpoint = config["endpoint"]
token = config["token"]
logger.info(
Expand Down
Loading