Skip to content

Commit

Permalink
Updated Quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
shreypandey committed May 22, 2024
1 parent c59cf99 commit 808a400
Show file tree
Hide file tree
Showing 4 changed files with 659 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .env-dev.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ AZURE_TRANSLATION_RESOURCE_LOCATION=
STORAGE_ACCOUNT_URL=
STORAGE_ACCOUNT_KEY=
STORAGE_AUDIOFILES_CONTAINER=
ENCRYPTION_KEY=
ENCRYPTION_KEY=
WA_API_HOST=
21 changes: 21 additions & 0 deletions docs/references/dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
layout: default
title: Dependencies
---

### Azure Blob Storage Account
JB Manager depends on [Azure Blob Storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction) for the persistent storage of input and output audio files through which user interacts with the bot.

You can either use an existing Azure storage account or [create a new azure storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal). After procurement of a storage account, [create a new container](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) in that storage account which will be used to store the audio files.

### Bhasini Translation API
JB Manager depends on Bhasini translation and speech processing functionalites for processing messages (both text and audio) in Indic languages. To access Bhasini API, register at [Bhashini](https://bhashini.gov.in/ulca/user/register).

### Azure Speech and Translation API
JB Manager depends on Azure speech and translation API for processesing non-Indic languages as well as fallback to Bhasini API.
1. [Create a Speech resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices) in the Azure portal.
2. Create a Translation resource in the Azure portal.
2. Procure the Speech and Translation resource key and region. After your resource is deployed, select Go to resource to view and manage keys. For more information about Azure AI services resources, see [Get the keys for your resource](https://learn.microsoft.com/en-in/azure/ai-services/multi-service-resource?pivots=azportal#get-the-keys-for-your-resource).

### Pinnacle Whatsapp API
For conversation with Bot, currently JB Manager depends on whatsapp access provided by [Pinnacle](https://www.pinnacle.in/whatsapp-business-api).
40 changes: 20 additions & 20 deletions docs/tutorials/Quickstart.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
# Quickstart Guide
---
layout: default
title: Quickstart
---

## Prerequisite
1. Docker - Ensure that your system has docker engine installed and running. For installation, please refer to [docker engine installation instruction](https://docs.docker.com/engine/install/).
2. Docker Compose - Ensure docker compose is enabled along with docker engine. Please refer to [docker compose installation instruction](https://docs.docker.com/compose/install/).
3. NGROK

## Dependencies
### Azure Blob Storage Account
JB Manager depends on [Azure Blob Storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction) for the persistent storage of input and output audio files through which user interacts with the bot.

You can either use an existing Azure storage account or [create a new azure storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal). After procurement of a storage account, [create a new container](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) in that storage account which will be used to store the audio files.

### Bhasini Translation API
JB Manager depends on Bhasini translation and speech processing functionalites for processing messages (both text and audio) in Indic languages. To access Bhasini API, register at [Bhashini](https://bhashini.gov.in/ulca/user/register).

### Azure Speech and Translation API
JB Manager depends on Azure speech and translation API for processesing non-Indic languages as well as fallback to Bhasini API.
1. [Create a Speech resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices) in the Azure portal.
2. Create a Translation resource in the Azure portal.
2. Procure the Speech and Translation resource key and region. After your resource is deployed, select Go to resource to view and manage keys. For more information about Azure AI services resources, see [Get the keys for your resource](https://learn.microsoft.com/en-in/azure/ai-services/multi-service-resource?pivots=azportal#get-the-keys-for-your-resource).
### Pinnacle Whatsapp API
For conversation with Bot, currently JB Manager depends on whatsapp access provided by [Pinnacle](https://www.pinnacle.in/whatsapp-business-api).

## Running JB Manager
1. Clone and Change the directory to the project root.
2. Copy the contents of `.env-dev.template` file to `.env-dev` in the same directory.
```bash
$ cp .env-dev.template .env-dev
```
3. Enter the values of `BHASHINI_USER_ID`,`BHASHINI_API_KEY`,`BHASHINI_PIPELINE_ID`,`AZURE_SPEECH_KEY`,`AZURE_SPEECH_REGION`,`AZURE_TRANSLATION_KEY`,`AZURE_TRANSLATION_RESOURCE_LOCATION`,`STORAGE_ACCOUNT_URL`, `STORAGE_ACCOUNT_KEY`, `STORAGE_AUDIOFILES_CONTAINER`
`WA_API_HOST` procured from the prerequisite step.
4. Generate an Encryption key using the following command
1. Update the values missing fields in the `.env-dev` file.
2. Generate an Encryption key using the following command
```bash
$ dd if=/dev/urandom bs=32 count=1 2>/dev/null | openssl base64
```
Expand Down Expand Up @@ -60,3 +47,16 @@ $ bash scripts/run.sh --stage api channel language flow frontend
```

## Bot Installation and Go Live

1. Go to [JB Manager UI](https://localhost:4173)
2. Click on install new bot and provide the required data to create your bot. The detailed information about the fields are given below:
1. **Name [Mandatory]** is the name of the bot.
2. **Code [Mandatory]** is the fsm.py file python code. Copy the contents of [python file](car_wash.py) and paste it.
3. **Requirements [Optional if no specialised pacakge is used in code]** is the required packages name with their versions as we put them usually in requirements.txt or pyproject.toml dependencies. For the above example, we don't have any external dependencies.
4. **index_urls [Optional]** is for custom and private packages links to download them from (This is for the case you use a library that your team has developed and internally published).
5. **version [Mandatory]** - version of the bot. Put `1.0.0`.
6. **required_credentials [Mandatory]** -

3. * Once the bot is created, click on the **settings (⚙) icon** to enter the given credentials values and click save to save the credentials values.
4. Then click on the **play (▶️) icon** to activate the bot by providing the whatsapp bot number and whatsapp api key.
5. Once the above steps are completed, the bot status will be changed from **inactive to active.**
Loading

0 comments on commit 808a400

Please sign in to comment.