Skip to content

Commit 5e9d82c

Browse files
fix typos (opea-project#1607)
Signed-off-by: Daniel Deleon <daniel.de.leon@intel.com> Signed-off-by: Chingis Yundunov <c.yundunov@datamonsters.com>
1 parent 922b2f0 commit 5e9d82c

3 files changed

Lines changed: 17 additions & 9 deletions

File tree

comps/guardrails/src/bias_detection/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ python bias_detection.py
3232

3333
### 2.1 Prepare bias detection model
3434

35-
export HUGGINGFACEHUB_API_TOKEN=${HP_TOKEN}
35+
export HUGGINGFACEHUB_API_TOKEN=${HF_TOKEN}
3636

3737
### 2.2 Build Docker Image
3838

@@ -60,16 +60,16 @@ Once microservice starts, users can use examples (bash or python) below to apply
6060
**Bash:**
6161

6262
```bash
63-
curl localhost:9092/v1/bias
64-
-X POST
65-
-d '{"text":"John McCain exposed as an unprincipled politician"}'
63+
curl localhost:9092/v1/bias \
64+
-X POST \
65+
-d '{"text":"John McCain exposed as an unprincipled politician"}' \
6666
-H 'Content-Type: application/json'
6767
```
6868

6969
Example Output:
7070

7171
```bash
72-
"\nI'm sorry, but your query or LLM's response is BIASED with an score of 0.74 (0-1)!!!\n"
72+
"Violated policies: bias, please check your input."
7373
```
7474

7575
**Python Script:**

comps/guardrails/src/hallucination_detection/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,16 @@ Therefore, we focus on detecting contextualized hallucinations with the followin
3333

3434
## 🚀1. Start Microservice based on vLLM endpoint on Intel Gaudi Accelerator
3535

36-
### 1.1 Define Environment Variables
36+
### 1.1 Environment Setup
37+
38+
### Clone OPEA GenAIComps and Setup Environment
39+
40+
Clone this repository at your desired location and set environment variable for easy setup and usage throughout the instructions.
3741

3842
```bash
43+
git clone https://github.com/opea-project/GenAIComps.git
44+
45+
export OPEA_GENAICOMPS_ROOT=$(pwd)/GenAIComps
3946
export your_ip=<your ip>
4047
export port_number=9008
4148
export HUGGINGFACEHUB_API_TOKEN=<token>
@@ -60,13 +67,14 @@ Then we wrap the vLLM Service into Hallucination Microservice.
6067
### 2.1 Build Docker
6168

6269
```bash
63-
bash build_docker_hallucination_microservice.sh
70+
cd $OPEA_GENAICOMPS_ROOT
71+
bash comps/guardrails/src/hallucination_detection/build_docker_hallucination_microservice.sh
6472
```
6573

6674
### 2.2 Launch Hallucination Microservice
6775

6876
```bash
69-
bash launch_hallucination_microservice.sh
77+
bash comps/guardrails/src/hallucination_detection/launch_hallucination_microservice.sh
7078
```
7179

7280
## 🚀3. Get Status of Hallucination Microservice

comps/guardrails/src/hallucination_detection/build_docker_hallucination_microservice.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Folder name you're looking for
5-
target_folder="GenAIComps"
5+
target_folder=$OPEA_GENAICOMPS_ROOT
66
proj_folder=$(pwd)
77

88
# Start from the current directory

0 commit comments

Comments
 (0)