Skip to content

Commit 2ae6871

Browse files
authored
Simplify ChatQnA AIPC user setting (opea-project#1573)
Signed-off-by: Wang, Xigui <[email protected]>
1 parent 2ac5be9 commit 2ae6871

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

ChatQnA/docker_compose/intel/cpu/aipc/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,18 @@ export host_ip="External_Public_IP"
8282

8383
For Linux users, please run `hostname -I | awk '{print $1}'`. For Windows users, please run `ipconfig | findstr /i "IPv4"` to get the external public ip.
8484

85-
**Export the value of your Huggingface API token to the `your_hf_api_token` environment variable**
85+
**Export the value of your Huggingface API token to the `HUGGINGFACEHUB_API_TOKEN` environment variable**
8686

8787
> Change the Your_Huggingface_API_Token below with tyour actual Huggingface API Token value
8888
8989
```
90-
export your_hf_api_token="Your_Huggingface_API_Token"
90+
export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token"
9191
```
9292

9393
**Append the value of the public IP address to the no_proxy list if you are in a proxy environment**
9494

9595
```
96-
export your_no_proxy=${your_no_proxy},"External_Public_IP",chatqna-aipc-backend-server,tei-embedding-service,retriever,tei-reranking-service,redis-vector-db,dataprep-redis-service
96+
export your_no_proxy=${your_no_proxy},"External_Public_IP",chatqna-aipc-backend-server,tei-embedding-service,retriever,tei-reranking-service,redis-vector-db,dataprep-redis-service,ollama-service
9797
```
9898

9999
- Linux PC
@@ -105,7 +105,7 @@ export https_proxy=${your_http_proxy}
105105
export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
106106
export RERANK_MODEL_ID="BAAI/bge-reranker-base"
107107
export INDEX_NAME="rag-redis"
108-
export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token}
108+
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
109109
export OLLAMA_HOST=${host_ip}
110110
export OLLAMA_MODEL="llama3.2"
111111
```
@@ -116,7 +116,7 @@ export OLLAMA_MODEL="llama3.2"
116116
set EMBEDDING_MODEL_ID=BAAI/bge-base-en-v1.5
117117
set RERANK_MODEL_ID=BAAI/bge-reranker-base
118118
set INDEX_NAME=rag-redis
119-
set HUGGINGFACEHUB_API_TOKEN=%your_hf_api_token%
119+
set HUGGINGFACEHUB_API_TOKEN=%HUGGINGFACEHUB_API_TOKEN%
120120
set OLLAMA_HOST=host.docker.internal
121121
set OLLAMA_MODEL="llama3.2"
122122
```

ChatQnA/docker_compose/intel/cpu/aipc/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ services:
109109
- RETRIEVER_SERVICE_HOST_IP=retriever
110110
- RERANK_SERVER_HOST_IP=tei-reranking-service
111111
- RERANK_SERVER_PORT=80
112-
- LLM_SERVER_HOST_IP=${OLLAMA_HOST}
112+
- LLM_SERVER_HOST_IP=ollama-service
113113
- LLM_SERVER_PORT=11434
114114
- LLM_MODEL=${OLLAMA_MODEL}
115115
- LOGFLAG=${LOGFLAG}

ChatQnA/docker_compose/intel/cpu/aipc/set_env.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ pushd "../../../../../" > /dev/null
77
source .set_env.sh
88
popd > /dev/null
99

10-
if [ -z "${your_hf_api_token}" ]; then
11-
echo "Error: HUGGINGFACEHUB_API_TOKEN is not set. Please set your_hf_api_token."
10+
export host_ip=$(hostname -I | awk '{print $1}')
11+
12+
if [ -z "${HUGGINGFACEHUB_API_TOKEN}" ]; then
13+
echo "Error: HUGGINGFACEHUB_API_TOKEN is not set. Please set HUGGINGFACEHUB_API_TOKEN."
1214
fi
1315

1416
if [ -z "${host_ip}" ]; then

0 commit comments

Comments
 (0)