Skip to content

Commit e878dc1

Browse files
[Doc] Add valid micro-service details (#194)
* [Doc] Add valid micro-service details Signed-off-by: Wang, Xigui <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Wang, Xigui <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 377dd2f commit e878dc1

File tree

2 files changed

+414
-10
lines changed

2 files changed

+414
-10
lines changed

ChatQnA/docker/gaudi/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ docker compose -f docker_compose.yaml up -d
127127

128128
### Validate MicroServices and MegaService
129129

130+
Follow the instructions to validate MicroServices.
131+
For validation details, please refer to [how-to-validate_service](./how_to_validate_service.md).
132+
130133
1. TEI Embedding Service
131134

132135
```bash
@@ -147,21 +150,17 @@ curl http://${host_ip}:6000/v1/embeddings \
147150

148151
3. Retriever Microservice
149152

150-
To consume the retriever microservice, you need to generate a mock embedding vector of length 768 in Python script:
151-
152-
```python
153-
import random
154-
155-
embedding = [random.uniform(-1, 1) for _ in range(768)]
156-
print(embedding)
157-
```
153+
To consume the retriever microservice, you need to generate a mock embedding vector by Python script. The length of embedding vector
154+
is determined by the embedding model.
155+
Here we use the model `EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"`, which vector size is 768.
158156

159-
Then substitute your mock embedding vector for the `${your_embedding}` in the following `curl` command:
157+
Check the vecotor dimension of your embedding model, set `your_embedding` dimension equals to it.
160158

161159
```bash
160+
your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)")
162161
curl http://${host_ip}:7000/v1/retrieval \
163162
-X POST \
164-
-d '{"text":"test", "embedding":${your_embedding}}' \
163+
-d "{\"text\":\"test\",\"embedding\":${your_embedding}}" \
165164
-H 'Content-Type: application/json'
166165
```
167166

0 commit comments

Comments
 (0)