You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: 12-Building-Apps.ipynb
+3-2
Original file line number
Diff line number
Diff line change
@@ -125,9 +125,10 @@
125
125
"In `apps/frontend/` folder you will find the files necesary to build a simple Streamlit application that will have:\n",
126
126
"\n",
127
127
"1) <u>A Search Interface</u>: Using `utils.py` and `prompts.py` and streamlit functions\n",
128
-
"2) <u>A WebChat Interface</u>: Using the Bot Service Web Chat javascript library we can render the WebChat Channel inside Streamlit as an html component\n",
128
+
"2) <u>A BotService Chat Interface</u>: Using the Bot Service Web Chat javascript library we can render the WebChat Channel inside Streamlit as an html component\n",
129
+
"3) <u>A FastAPI Chat Interface</u>: Using LangServe/FastAPI as backend, we use streamlit components to provide a streaming chat interface (MORE ON THIS LATER)\n",
129
130
"\n",
130
-
"Notice that in (1) the logic code is running in the Frontend Web App, however in (2) the logic code is running in the Backend Bot API and the Frontend is just using the WebChat channel from the Bot Service.\n",
131
+
"Notice that in (1) the logic code is running in the Frontend Web App, however in (2) and (3) the logic code is running in the Backend Bot API and the Frontend is just using the WebChat channel from the Bot Service.\n",
131
132
"\n",
132
133
"GO AHEAD NOW AND FOLLOW THE INSTRUCTIONS in `apps/frontend/README.md`"
Copy file name to clipboardexpand all lines: apps/backend/langserve/README.md
+32-6
Original file line number
Diff line number
Diff line change
@@ -8,20 +8,46 @@ This bot has been created using [LangServe](https://python.langchain.com/docs/la
8
8
9
9
Below are the steps to run the LangServe Bot API as an Azure Wep App:
10
10
11
-
1. We don't need to deploy again the Azure infrastructure, we did that already for the Bot Service API (Notebook 12). We are going to use the same App Service and just change the code.
11
+
1. We don't need to deploy again the Azure infrastructure, we did that already for the Bot Service API (Notebook 12). We are going to use the same App Service, but we just need to add another SLOT to the service and have both APIs running at the same time. Note: the slot can have any name, we are using "staging".<br> In the terminal run:
5. Once you confirm that the API is working on step 4, you need to add the endpoint to the frontend page code. Go to `apps/frontend/pages` and edit `3_FastAPI_Chat.py`:
37
+
38
+
```python
39
+
# ENTER HERE YOUR LANGSERVE FASTAPI ENDPOINT
40
+
# for example: "https://webapp-backend-botid-zf4fwhz3gdn64-staging.azurewebsites.net"
6. Re-deploy FrontEnd code: Zip the code of the bot by executing the following command in the terminal (you have to be inside the folder: **apps/frontend/** ):
46
+
47
+
```bash
48
+
zip frontend.zip ./*&& zip frontend.zip ./pages/*&& zip -j frontend.zip ../../common/*
Copy file name to clipboardexpand all lines: apps/frontend/README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,12 @@ Also includes a Search experience.
12
12
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fpablomarin%2FGPT-Azure-Search-Engine%2Fmain%2Fapps%2Ffrontend%2Fazuredeploy-frontend.json)
13
13
14
14
2. Zip the code of the bot by executing the following command in the terminal (you have to be inside the folder: apps/frontend/ ):
15
+
15
16
```bash
16
-
zip frontend.zip ./*
17
-
zip frontend.zip ./pages/*
18
-
zip -j frontend.zip ../../common/*
17
+
zip frontend.zip ./*&& zip frontend.zip ./pages/*&& zip -j frontend.zip ../../common/*
19
18
```
20
19
3. Using the Azure CLI deploy the frontend code to the Azure App Service created on Step 2
0 commit comments