The goal of this project is to help you get up and running quickly with a build out of a RAG model. You can skip to the actual build out below or if you're interested in learning more about the RAG model, you can read some of the documentation here:
- Hugging Face’s RAG documentation provides a detailed explanation of the RAG model and its implementation.
- RAG and generative AI - Azure AI Search: This page provides an overview of RAG and its application in Azure AI Search.
- IBM’s AI RAG page provides a conceptual architecture of a RAG solution, showing the major components and the flow of interactions between them to respond to a user query.
- A Simple Guide To Retrieval Augmented Generation Language Models includes a diagram showing the generator flow in a RAG-based system.
- Retrieval augmented generation (RAG) explained provides a simple diagram that shows the process of RAG at the intersection of natural language generation (NLG) and information retrieval (IR).
In general, RAG is a way to overcome the need to constantly train and retrain a Large Language Model (LLM). The LLM is powerful, but the challenge is lies with creating it in the first place. LLM's are neural networks with 100's of billions of nodes with each node inter-connected to the others. Once trained, the models are static and work well for Generative AI use-cases, but the initial training is very expensive because all the inter-connect nodes require a lot of computation to build ( and tune). You can learn more about the challenges in this in-depth paper here: Efficient LLM Training. .
Customers who implement the RAG model can not only solve the training issues, but they also gain the following benefits:
- Access to External Knowledge: RAG provides LLMs access to external knowledge through documents, resulting in contextually accurate and factual responses.
- Cost-Effective: RAG is more cost-effective than fine-tuning, as it doesn’t require the labeled data and computational resources that come with model training.
- Improves Accuracy: RAG improves the accuracy and contextuality of LLM-generated responses while minimizing factual inaccuracies.
- Up-to-Date Information: RAG ensures that the model has access to the most current, reliable facts.
- Transparency: Users have access to the model’s sources, ensuring that its claims can be checked for accuracy and ultimately trusted.
- Control Over Generated Text: Organizations have greater control over the generated text output.
- Reduces Data Leakage: By grounding an LLM on a set of external, verifiable facts, the model has fewer opportunities to pull information baked into its parameters. This reduces the chances that an LLM will leak sensitive data.
- Reduces Need for Continuous Training: RAG reduces the need for users to continuously train the model on new data and update its parameters as circumstances evolve4.
This project will allow you to build a RAG implementation by incorporating Azure OpenAI and CosmosDB into a Teams Channel. In this implementation, you will be able to ask questions about sample data uploaded into the database via a Teams chat.
Component | Activity |
---|---|
Teams | User enters text in chat |
Logic App | Logic app invokes Azure function. Once the call to the function completes, the App injects the response back into the chat as a response. |
Azure Function | Functions reads contents from cosmosDB, creates the prompt and calls OpenAI. After receiving the response from OpenAI, the function perform additional computation before responding to the Logic App. |
CosmosDB | Contains the data that will be used to augment the chat request |
OpenAI | The hosted LLM that is responsible for processing the enhanced request and formulating a response. |
You will need the following in order to run through this quickstart:
- An Azure subscription with the ability to create Azure resources: ( Resource Group, Logic App, Azure Function, CosmosDB and Azure OpenAI ).
- Access to the OpenAI offering in Azure. You can request access if you do not have it.
- A computer with VS Code installed on it: Windows / Mac - wsl.
- Azure Functions Core Tools installed on the computer.
- Python 3.11 or 3.10.
Teams will be used as the chat UI for this project. To keep things simple, create a new team. Once created, we'll use it's general channel for the entry point into RAG.
![](https://private-user-images.githubusercontent.com/81572024/321349439-3805c120-82af-48da-83aa-500f68f50dec.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjEzNDk0MzktMzgwNWMxMjAtODJhZi00OGRhLTgzYWEtNTAwZjY4ZjUwZGVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwZGQxZmU1NzFkYTJkMWFlZThmZTFjM2U0MzkzYTk4ZjgxMGYwY2FhYTFhNDA0NTdiYWU0YzBjNGY0MzM3MWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hSYq2GauHNon-CbnqUcC0amLibbOTB13qdn0Sr2z_so)
The Logic App will be used to shuttle message between the Teams chat and Azure Functions. Create a new Logic App in the Azure Portal.
![](https://private-user-images.githubusercontent.com/81572024/321351706-6f5c2315-812f-417a-b1b2-3d82973125ab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjEzNTE3MDYtNmY1YzIzMTUtODEyZi00MTdhLWIxYjItM2Q4Mjk3MzEyNWFiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYzNDhmZjg1OTViM2EzMjE3NTlhMGRlYmQxMWMwMmQyYjE4ZTZkMzkzMjg5YThmOGJiZTgwNTliOWM0OTU3NDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BGPb8kNSlrYTOnaq_w__JxiTjHOsnrm6RalTh_uj9jo)
The Azure Function app will be used to call the OpenAI service and is we will implement the RAG model. Create a new instance in the portal using Python 3.11 on Linux using the serverless option. We'll need to deploy this from you laptop so If you have a different version of python installed locally, choose the version that matches your local system.
![](https://private-user-images.githubusercontent.com/81572024/321352490-fd2c9000-aff1-434b-835c-a3f836e272e2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjEzNTI0OTAtZmQyYzkwMDAtYWZmMS00MzRiLTgzNWMtYTNmODM2ZTI3MmUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY0MGRkZWJkMjFmOGQwNmRhYmJiYWY2YzAyNWQ1MzBkZThiN2MzMTk1ODgyMzJjYjFmOTIxNzk4YmQ0MWU2M2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PSok7rz5wKvUwFt3ZpoMYILCuJpVAdC23ZXb3JQNZMM)
Now for the LLM magic. Here we'll create an OpenAI Instance from the portal. Note, you will need to apply for access ( and be accepted ) before you can instantiate this. If you don't have access yet, click on Apply for access
![](https://private-user-images.githubusercontent.com/81572024/321354141-83126828-2798-4e98-8889-a39faafa4470.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjEzNTQxNDEtODMxMjY4MjgtMjc5OC00ZTk4LTg4ODktYTM5ZmFhZmE0NDcwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwZTdjZDUxOWY4MWIwMmZkMmUzZjc2MGFmOGY0OWIxNWYwN2MxNzkyMjI2ZTYwNmYxZDFiZWU0NzkyNmVkNzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BpozilUB0PC_3s31yvk1iBfz1xGLVVEHzSEcXJJrn1Q)
You will receive an email that you have been granted access. Once you have that, create a new instance using the S0 tier. We’ll create the GPT-3 instance in the next step.
![](https://private-user-images.githubusercontent.com/81572024/321354472-d03ef280-afa1-485e-9833-13f60ada2578.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjEzNTQ0NzItZDAzZWYyODAtYWZhMS00ODVlLTk4MzMtMTNmNjBhZGEyNTc4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwZTk4NGE4YjYxNGUwNGU5N2ZkZDkwM2ZjMzE1ZmUyZGVhMTlkMGM4NzQ1MGU4ZGMzN2FkYWUxNTI1NTUxNTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vU0-rYBJvMCbaZaV4EkxChm9zo0Qpy_-q-TzABu5aqg)
In the portal navigate to the deployed instance and select "Model deployments" on the left:
![image](https://private-user-images.githubusercontent.com/81572024/321402683-f6dc7d7d-6a5b-4c28-9562-9abff246c736.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE0MDI2ODMtZjZkYzdkN2QtNmE1Yi00YzI4LTk1NjItOWFiZmYyNDZjNzM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2Yjg5ODE4ZTE2OGI0MTQ2ODg2MWY1MjA4YmIzZTE4NTRiZjg5YWUwYzg5OGYxYjM5YjA4YWMwMjA4MWYwMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.EWgGwy8ZWY0tCeKNCf7uVM5E-aePuEpf0a3S316aOiY)
This will ask you to confirm that you're navigating to Azure OpenAI Studio. Confirm and create a new deployment:
![](https://private-user-images.githubusercontent.com/81572024/321402396-58cc84a8-8fb4-490a-930b-5ceef29d1576.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE0MDIzOTYtNThjYzg0YTgtOGZiNC00OTBhLTkzMGItNWNlZWYyOWQxNTc2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5ZDgzZjI0ZWI1MGE5YWM0OWM3ZWU1Zjc0ZjUyNTM1Y2E5YzQzMzFmZjc0OThiYWRmMTg2ZWYzNjMyMDZlMTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.eDgp0avedVlpnNR11lLrCAKnkjXV_As8e9ncd9xLchc)
Make a note of this deployment name, the endpoint and key. You will need these when you configure your Azure Function settings. In the example above, the deployment name is called gpt35.
Now we'll need a place to keep the data that will be used to generate the enhanced prompt. We're going to store this information in CosmosDB. The cool thing about CosmosDB is that it very easy to connect to Azure Functions. Azure Functions has a lot of different bindings including SQL but it's slightly less complex to read from CosmosDB. ( You can watch this video for more details on connecting CosmosDB. )
![](https://private-user-images.githubusercontent.com/81572024/321386953-214fa10d-5d8c-4d51-875c-f4b808d4e4b4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjEzODY5NTMtMjE0ZmExMGQtNWQ4Yy00ZDUxLTg3NWMtZjRiODA4ZDRlNGI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkYjU3YzA1MTk2ZWZkZjJkMTBjNzEyYzNiMTQxMDM2NTNmMGE5ZGZiYzczYmQ3OTc5YTY1YjVkZTA4ZjIxZjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.c_t0wcapcQ3lCfTMyaMlZPoSnp_q7-lbZtwA3Im0axQ)
Overall implementing a Retrieval-Augmented Generation (RAG) model involves several steps. They are detailed below. In our implementation, we're doing all the steps except for the: Embedding and Vector Database steps. After you finish implementation, try to identify where each of these steps are performed.
- Define Use Case: Start by defining the specific use case for your RAG implementation. Determine the domain or topic for which you want the Large Language Model (LLM) to generate responses augmented by retrieved information.
- Select an LLM: Choose a suitable Large Language Model for your RAG implementation.
- Data Collection: Collect a set of documents, also known as a corpus, that the model will use to retrieve information.
- Data Preprocessing: Transform and enrich the data to make it suitable for model augmentation.
- Embedding: Use an embedding model to convert the source data into a series of vectors that represent the words in the client data.
- Vector Database: Store the generated embeddings in a vector database.
- User Query: Receive a user input and perform a similarity measure between the collection of documents and the user input.
- Post-Processing: Post-process the user input and the fetched document(s). The post-processing is done with an LLM.
- Response Generation: Generate a response based on the user’s query and the retrieved documents.
In our implementation, we are going to ingest sample data and layer it on top of the general knowledge the LLM already knows about. We will then use Azure OpenAI to answer questions about the combined data. This repo already has the source data as 1 sentence for each fact but you can tune it if you like.
In order to ingest the sample data, we're going to use the Cloud Shell ( or your own az cli that is already logged in )
![image](https://private-user-images.githubusercontent.com/81572024/321359547-b138de44-5a73-442e-9c95-dca6b7890e12.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjEzNTk1NDctYjEzOGRlNDQtNWE3My00NDJlLTljOTUtZGNhNmI3ODkwZTEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE0MjgxNzQyNzQ1ZDAwNzVkOWQzM2EwMDA5Y2MyNTU2YjQyNDQzMjM5OGU4YmMxNDUzNTA4Yzk3OTk0YzAwNDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yC_aQCOjC6J0ww0rMGhiwmaYWsWhM39uecs3c29-5oo)
In the cloud shell, clone this repo so that you have access to the scripts:
git clone https://github.com/nagendramishr/mini-rag-quickstart.git
Edit the first three variables of bin/setup.sh as shown below with the correct values for the resources your created.
>head -5 bin/setup.sh
#!/bin/sh
export RG=aoai-rag
export COSMOS_ACCT=nvmopenaicosmosdb
export AOAI_APP=nvmaoai-teams
As stated earlier, the sample facts are stored in this file: data/cosmosdb-facts.txt
. They were generated via the prompt generator as a test for this exercise. You can modify the prompt and generate your own facts or add additional lines to the data. The prompt is contained in data/datagen_prompt.txt
and you can simply cut and paste it into bing chat to generate a new response set.
chmod ugo+x bin/*
source bin/setup.sh
bin/createDB.sh
bin/insertCosmos.py
Your cosmosDB instance should now be updated with the contents of the data file. You can use the data explorer to validate or update the facts in the Azure Portal.
![image](https://private-user-images.githubusercontent.com/81572024/322212985-57330179-4f4e-4406-8a59-2b8787230059.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjIyMTI5ODUtNTczMzAxNzktNGY0ZS00NDA2LThhNTktMmI4Nzg3MjMwMDU5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhNzM1YTlkZDI5NjkwNWZhN2MyYTNjM2U1ZTE0MGExYzc4OGZlNTEyNDVhMDhhMWUxOGM1MGQ5YTQxZjdiNmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ivZQsZIWlVRiVwzlSSBVWQ9_o8NimgFcOxSywTMXuJM)
The source code for an Azure Function has already been created for you in src/azureFunction
. This code needs to be deployed to Azure and then configured with the endpoints for CosmosDB and OpenAI.
Since you will be doing development in this code for your homework, it will be best to open it up in VS Code locally on your local machine. For this part, you will need to install Python and the Azure Functions Core Tools You will also need the following VSCode extensions installed:
![](https://private-user-images.githubusercontent.com/81572024/321720366-32fb63a4-d068-49ee-a5ba-81844a56e124.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE3MjAzNjYtMzJmYjYzYTQtZDA2OC00OWVlLWE1YmEtODE4NDRhNTZlMTI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBlZTRiNzNlZjMwY2UzMDljNjQ3YWJjOWI4NmQxNTc1MTg2NTJhYjFiM2EzNTQ3MzQzZDViMjliOThjNDExZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.nTl7afhgM9J7m21ZMFV4MzJEupkqIBn03TdkP8eaEP8)
![](https://private-user-images.githubusercontent.com/81572024/321720416-2eafb8db-7c7f-4ac0-9ca8-aa9a32077818.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE3MjA0MTYtMmVhZmI4ZGItN2M3Zi00YWMwLTljYTgtYWE5YTMyMDc3ODE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkxYTNkMmYyYjk2YjNiZDAxZGU3MjFiNDM4ZTY3NDRjNzU0OTczMmY5ZThmODMzNzc3YWRlMzVhYTA4ZDQ0NGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5EU60LXoiU2GoD8hTK-Fp6P253g8aNIea7jktuyRtc4)
Once installed, we'll be making edits to the code on your local machine. Clone the code locally and source setup.sh:
> git clone https://github.com/nagendramishr/mini-rag-quickstart.git
> cd mini-rag-quickstart
> source bin/setup.sh
Now open up VS Code to the src/azureFunctions
folder that you cloned locally. Your VS Code Explorer section should look like this:
![](https://private-user-images.githubusercontent.com/81572024/321720979-252e4c7e-1fc3-4874-a293-de06954ec1fb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE3MjA5NzktMjUyZTRjN2UtMWZjMy00ODc0LWEyOTMtZGUwNjk1NGVjMWZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFkN2E0OGFjNTBiM2FmYzUzYWY2MGM1MmEzOTVhYWVlOTA1N2FkNjAwNjhmMGVjZmYyOTkzOTc5MzI3ZWQ4ODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IlyX1XuupHrFsSxH2lMhEUYnAp_paKL4Yjo64PkCOAI)
The ability to deploy your code to Azure was added to your VSCode via the extensions above. If you want to know more about deploying from VS code you can watch this video.
- Type
Ctrl-Shift-P
and select Azure Functions: Deploy to Function App.... - Select your subscription
- Select your function app
- Confirm that you want to deploy the function
- Verify that the code was deployed by looking for the function in the Azure Portal
![image](https://private-user-images.githubusercontent.com/81572024/322213383-710ce730-091d-46aa-9b72-426acc821b0c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjIyMTMzODMtNzEwY2U3MzAtMDkxZC00NmFhLTliNzItNDI2YWNjODIxYjBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRjY2FiZjRkMTEwZGFjYjk2M2ZkZDMzNDQ0ODI0OTAzNDcxZWQ3YmY2ZTljYTI2OWFjZGYzZjk3NzdlYzUwN2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vkTty3N_idbEj5s88mWML7MOhLF5zBn0BD_5sBAgsxE)
If you do not see the function AskQuestion
, than the deployment did not succeed ( or it is still uploading ).
Now that your function code has been deployed, you next need to configure it so that it knows about your CosmosDB and OpenAI endpoints.
Edit the contents of bin/updateFNConfig.sh
Note: The AOAI_KEY
and AOAI_ENDPOINT
are listed on the Azure Portal:
![image](https://private-user-images.githubusercontent.com/81572024/322065065-a42f03d0-3fb7-4794-9ff7-dec87f218411.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjIwNjUwNjUtYTQyZjAzZDAtM2ZiNy00Nzk0LTlmZjctZGVjODdmMjE4NDExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRjMmRhMTUwYmY2OGJkZTFiZTYwNzEwOGU0ZGVjYjQwYjRmZWI1NjJmNGQ5NDUzZDk3M2IyY2VkOTQ5NDAxMzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Q0Y6MVET08XNBXOOAc5OagtAEj-3E0A65dvdWvs1wuc)
The MyAccount_COSMOSDB
variable should be defined with the value of $COSMOS_CONNSTR
. You can also grab it from the portal as well:
![image](https://private-user-images.githubusercontent.com/81572024/322066553-61e0fe88-bcdb-4afa-bf67-c5f8763090e7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjIwNjY1NTMtNjFlMGZlODgtYmNkYi00YWZhLWJmNjctYzVmODc2MzA5MGU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY3ZTdiZjc0ZTkwODcwZGU5ZDZmNTFlNGMxNDE0NjM1NjE0NTBlZWVjOWIwMzcyNTRiMzI0NzIxY2IyNzM0OWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GhMMx4MNgXQ41fWdbopW7HTA1hPVcdZiwySQ5aVquXA)
Now run the update script to configure the values in your Azure Function.
bin/updateFNConfig.sh
You may have to restart your Azure function, but it should now be up and running. You are ready to connect it to the Logic App.
Overall, the logic app has 3 steps.
-
It gets triggered when a message appears in Teams. In this step we will need to configure the teams connection and grant access to the Logic App.
-
Once a message is received, if the Subject is "Question", the Azure function from the previous step will be called with the users question.
-
The response from the Azure Function will be uploaded into Teams as a reply to the original message.
In the first step, add a trigger: When a new channel message is added. Select the team that was created in step 1 along with the General channel. You will be asked to login and allow the Logic App to connect on your behalf. For the question How often do you want to check for items?, select once per minute.
![](https://private-user-images.githubusercontent.com/81572024/321637791-9d25e91e-740f-427d-a388-f1bf23d3731d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE2Mzc3OTEtOWQyNWU5MWUtNzQwZi00MjdkLWEzODgtZjFiZjIzZDM3MzFkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE1ZTdjOGY3NGM1YmFhOTk4OWQ5MjFkMGIzOGZmNzU2M2I3NDkxMjFjZDQzY2FkYjMzYWQwOWM2MWE0MTU3MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Y378pfwg6KuFr9yauYGoa6bSHCiMJe8POLjNCnyQDOo)
Add Condition as the next action and require that the Message Subject is equal to "Question". If up don't do this, the bot will get triggered when it responds to your question and it will respond to its own response.
![](https://private-user-images.githubusercontent.com/81572024/321638351-a6b2e6a9-87e1-4ce6-ba22-1c20880f312a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE2MzgzNTEtYTZiMmU2YTktODdlMS00Y2U2LWJhMjItMWMyMDg4MGYzMTJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYyN2VhODgyY2M3ZjQ3YTkxNDIxZDRhYWViMzE1NWU5NTJiNTMxNTcwMzQ2ODM5NDQ3ZGM0MTNlNTBmZWFkYzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YZKzyFyXAwFnRHG9D2SACL8dKiiOwrN5aS6CY8AZcY8)
On the True side of the condition, add an HTTP action. This action will call the Azure Function with a question whose value is the message body content that was posted on teams. For the URL, enter the URL for your Azure Function.
![](https://private-user-images.githubusercontent.com/81572024/321639701-fc84af51-b7fe-40aa-ade6-91d46d3fac72.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE2Mzk3MDEtZmM4NGFmNTEtYjdmZS00MGFhLWFkZTYtOTFkNDZkM2ZhYzcyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkOWIzZmU2NGU5NjRlOTc3ZjhkNDkxZTEzMzhjZDUzMTZmN2IxNjI3ZTBjMTBlYjg5ZGY2MWM2MTE1YTZjMTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PZL3QW7dc8l0ifYEEBtfSrXX84O4KL6ZjO2iu-tCnhs)
You can find the URL for your Azure Function by clicking into the "AskQuestion" function on the Overview page and then clicking Get Function URL:
![image](https://private-user-images.githubusercontent.com/81572024/321644447-d53d5487-60bb-41f9-9d5b-459c5f75ca18.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE2NDQ0NDctZDUzZDU0ODctNjBiYi00MWY5LTlkNWItNDU5YzVmNzVjYTE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxMmJjYTI4MzdhZWJjMTc0YjA0ZjM2YWRmODYzNjhjNzc1MTVhNWE4ZjU4OWFhZmQzMzQ1ZjdmNzkzNDQyNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jQLkr3Qqst2TPVy9z78GmiqVZ0Fig7ptARZHXCDrg8g)
After the HTTP step, add another action: Reply with a message in channel. Here, the important part is to select the message ID from the original question as the message ID for the response. Also, be sure to include the Body from the HTTP request which contains the BOT's response.
![](https://private-user-images.githubusercontent.com/81572024/321644972-eecff9c7-e25d-4c34-b287-3a7c95c07e03.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE2NDQ5NzItZWVjZmY5YzctZTI1ZC00YzM0LWIyODctM2E3Yzk1YzA3ZTAzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTczYjU2YjdiM2YyNjZlZGM5YWNlMzI5MjE3Y2E2MThkNGE5ZTVjYWJhOTUyNDIwNzE1Y2ZlMGQ2OTc0ZjE5NTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YppPo6Fo-n3umM2kUeX53x55KI-VWSwnqhCh8er3xOQ)
Now that the data has been upload and your Azure services configured, you can test the solution by posting a message in the teams channel and after a few minutes, you will see a response.
![](https://private-user-images.githubusercontent.com/81572024/321646922-e12e0d46-cde9-4aec-9866-e31785b781b4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE2NDY5MjItZTEyZTBkNDYtY2RlOS00YWVjLTk4NjYtZTMxNzg1Yjc4MWI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIzZmE5Zjk4Yzk1OWI1ZmQ1M2RiY2E3ZWQ4M2JjMGQ3MDY1NjBiMGQ4ZTdhNTNiNTU0ZWE4OWE0N2MxMWEyNTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.X9z425-AzfG3NYMQmmUmOW45vq0Zi_vP-JpD3HRhZS8)
![](https://private-user-images.githubusercontent.com/81572024/321652192-f6a0d6fd-281d-487d-91fa-dd3a69cd9090.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE2NTIxOTItZjZhMGQ2ZmQtMjgxZC00ODdkLTkxZmEtZGQzYTY5Y2Q5MDkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYxZDVmMGE1ZDQwMGQ4NzViOTMwNmRiMmRjYTZiYWQxNjQ2MWQ2NTVkMWY1MDA5YmIxYjFjYmNiNDE2MmE5YWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.A07F322AsBWnyWyTcspZJq3nYJ93qvQyihzq5GMha9Q)
![](https://private-user-images.githubusercontent.com/81572024/321765053-199b9c18-f14d-4096-9318-c46b6a8e76b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDgzMjIsIm5iZiI6MTcyNDAwODAyMiwicGF0aCI6Ii84MTU3MjAyNC8zMjE3NjUwNTMtMTk5YjljMTgtZjE0ZC00MDk2LTkzMTgtYzQ2YjZhOGU3NmI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE5MDcwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEyZjQ2OTA1ZDFiMmZhMmY0MWU5YjlhNTA4MzEwZmM5OGY2M2Q2YThlNWJhZjFjMzZhOWIxMmU1Zjc0NmJlMmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.33YU6Rvu-rNCcUS73FYzqxPV4gEZo0cvKjcu3Ltpn4I)