doc: fix headings and indenting (#748)
* doc: fix headings and indenting * only one H1 header (for title) is allowed * fix indenting under ordered lists Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
@@ -110,29 +110,29 @@ docker compose up -d
|
||||
|
||||
1. TGI Service
|
||||
|
||||
```bash
|
||||
curl http://${host_ip}:8028/generate \
|
||||
-X POST \
|
||||
-d '{"inputs":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","parameters":{"max_new_tokens":256, "do_sample": true}}' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
```bash
|
||||
curl http://${host_ip}:8028/generate \
|
||||
-X POST \
|
||||
-d '{"inputs":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","parameters":{"max_new_tokens":256, "do_sample": true}}' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
2. LLM Microservices
|
||||
|
||||
```bash
|
||||
curl http://${host_ip}:9000/v1/chat/completions\
|
||||
-X POST \
|
||||
-d '{"query":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","max_new_tokens":256,"top_k":10,"top_p":0.95,"typical_p":0.95,"temperature":0.01,"repetition_penalty":1.03,"streaming":true}' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
```bash
|
||||
curl http://${host_ip}:9000/v1/chat/completions\
|
||||
-X POST \
|
||||
-d '{"query":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","max_new_tokens":256,"top_k":10,"top_p":0.95,"typical_p":0.95,"temperature":0.01,"repetition_penalty":1.03,"streaming":true}' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
3. MegaService
|
||||
|
||||
```bash
|
||||
curl http://${host_ip}:7778/v1/codegen -H "Content-Type: application/json" -d '{
|
||||
"messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
|
||||
}'
|
||||
```
|
||||
```bash
|
||||
curl http://${host_ip}:7778/v1/codegen -H "Content-Type: application/json" -d '{
|
||||
"messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
|
||||
}'
|
||||
```
|
||||
|
||||
## 🚀 Launch the Svelte Based UI
|
||||
|
||||
|
||||
@@ -113,29 +113,29 @@ docker compose up -d
|
||||
|
||||
1. TGI Service
|
||||
|
||||
```bash
|
||||
curl http://${host_ip}:8028/generate \
|
||||
-X POST \
|
||||
-d '{"inputs":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","parameters":{"max_new_tokens":256, "do_sample": true}}' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
```bash
|
||||
curl http://${host_ip}:8028/generate \
|
||||
-X POST \
|
||||
-d '{"inputs":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","parameters":{"max_new_tokens":256, "do_sample": true}}' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
2. LLM Microservices
|
||||
|
||||
```bash
|
||||
curl http://${host_ip}:9000/v1/chat/completions\
|
||||
-X POST \
|
||||
-d '{"query":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","max_new_tokens":256,"top_k":10,"top_p":0.95,"typical_p":0.95,"temperature":0.01,"repetition_penalty":1.03,"streaming":true}' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
```bash
|
||||
curl http://${host_ip}:9000/v1/chat/completions\
|
||||
-X POST \
|
||||
-d '{"query":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","max_new_tokens":256,"top_k":10,"top_p":0.95,"typical_p":0.95,"temperature":0.01,"repetition_penalty":1.03,"streaming":true}' \
|
||||
-H 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
3. MegaService
|
||||
|
||||
```bash
|
||||
curl http://${host_ip}:7778/v1/codegen -H "Content-Type: application/json" -d '{
|
||||
"messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
|
||||
}'
|
||||
```
|
||||
```bash
|
||||
curl http://${host_ip}:7778/v1/codegen -H "Content-Type: application/json" -d '{
|
||||
"messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
|
||||
}'
|
||||
```
|
||||
|
||||
## 🚀 Launch the UI
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
> [NOTE]
|
||||
> The following values must be set before you can deploy:
|
||||
> HUGGINGFACEHUB_API_TOKEN
|
||||
|
||||
>
|
||||
> You can also customize the "MODEL_ID" if needed.
|
||||
|
||||
>
|
||||
> You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGen workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
|
||||
> Alternatively, you can change the `codegen.yaml` to use a different type of volume, such as a persistent volume claim.
|
||||
|
||||
|
||||
@@ -7,30 +7,32 @@ You can use react-codegen.yaml to deploy CodeGen with reactUI.
|
||||
kubectl apply -f react-codegen.yaml
|
||||
```
|
||||
|
||||
## Prerequisites for Deploying CodeGen with ReactUI:
|
||||
## Prerequisites for Deploying CodeGen with ReactUI
|
||||
Before deploying the react-codegen.yaml file, ensure that you have the following prerequisites in place:
|
||||
|
||||
1. Kubernetes installation: Make sure that you have Kubernetes installed.
|
||||
2. Configuration Values: Set the following values in react-codegen.yaml before proceeding with the deployment:
|
||||
#### a. HUGGINGFACEHUB_API_TOKEN (Your HuggingFace token to download your desired model from HuggingFace):
|
||||
|
||||
a. HUGGINGFACEHUB_API_TOKEN (Your HuggingFace token to download your desired model from HuggingFace):
|
||||
```
|
||||
# You may set the HUGGINGFACEHUB_API_TOKEN via method:
|
||||
export HUGGINGFACEHUB_API_TOKEN="YourOwnToken"
|
||||
cd GenAIExamples/CodeGen/kubernetes/manifests/xeon/ui/
|
||||
sed -i "s/insert-your-huggingface-token-here/${HUGGINGFACEHUB_API_TOKEN}/g" react-codegen.yaml
|
||||
```
|
||||
#### b. Set the proxies based on your network configuration
|
||||
b. Set the proxies based on your network configuration
|
||||
```
|
||||
# Look for http_proxy, https_proxy, no_proxy key and fill up the value with your proxy configuration.
|
||||
```
|
||||
3. MODEL_ID and model-volume (OPTIONAL): You may as well customize the "MODEL_ID" to use different model and model-volume for the volume to be mounted.
|
||||
4. After completing these, you can proceed with the deployment of the react-codegen.yaml file.
|
||||
|
||||
## Verify Services:
|
||||
## Verify Services
|
||||
Make sure all the pods are running, you should see total of 4 pods running:
|
||||
1. codegen
|
||||
2. codegen-llm-uservice
|
||||
3. codegen-react-ui
|
||||
4. codegen-tgi
|
||||
|
||||
- codegen
|
||||
- codegen-llm-uservice
|
||||
- codegen-react-ui
|
||||
- codegen-tgi
|
||||
|
||||
You may open up the UI by using the codegen-react-ui endpoint in the browser.
|
||||
|
||||
Reference in New Issue
Block a user