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: README.MD
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,20 +45,22 @@ Clean, easy and efficient.
45
45
46
46
The whole architecture is built using the following Azure services:
47
47
48
-
-[Azure SQL Database](https://learn.microsoft.com/en-us/azure/azure-sql/database/sql-database-paas-overview?view=azuresql): to store and query the samples data and embeddings.
49
-
-[Azure Static Web Apps](https://learn.microsoft.com/en-us/azure/static-web-apps/overview): to host the full-stack application, including the front-end and the [backend API for Azure SQL](https://learn.microsoft.com/en-us/azure/static-web-apps/database-overview).
48
+
-[Azure SQL Database](https://learn.microsoft.com/azure/azure-sql/database/sql-database-paas-overview?view=azuresql): to store and query the samples data and embeddings.
49
+
-[Azure Static Web Apps](https://learn.microsoft.com/azure/static-web-apps/overview): to host the front-end application, and to provide reverse proxy to Data API builder.
50
+
-[Azure Container Apps](https://learn.microsoft.com/azure/container-apps/overview): to host [Data API builder](https://learn.microsoft.com/en-us/azure/data-api-builder/overview), which is used to expose the database stored procedures as REST API.
50
51
-[Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai/): to generate the embeddings for the samples data and to generate the results using the RAG pattern.
51
52
52
53
## Solution
53
54
54
55
### Pre-requisites
55
56
56
57
Local development is possible, but you still have to have an Azure OpenAI subscription to generate the embeddings and the results.
57
-
All you need to have to run the sample locally is
58
+
All you need to have to run the sample locally is:
58
59
59
60
-[Node](https://nodejs.org/en) - to run the front-end application.
60
-
-[DotNet SDK 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) or later to run Data API builder and deploy the database.
61
-
-[Static Web Apps CLI](https://learn.microsoft.com/en-us/azure/static-web-apps/static-web-apps-cli-overview) - to run the full-stack application locally.
61
+
-[DotNet SDK 8](https://dotnet.microsoft.com/download/dotnet/8.0) or later to run Data API builder and deploy the database.
62
+
-[Static Web Apps CLI](https://learn.microsoft.com/azure/static-web-apps/static-web-apps-cli-overview) - to run the full-stack application locally.
63
+
-[Data API builder](https://learn.microsoft.com/azure/data-api-builder/how-to/install-cli) - to run the API locally.
62
64
63
65
### Azure Open AI
64
66
@@ -67,7 +69,7 @@ Make sure to have two models deployed, one for generating embeddings (*text-embe
67
69
- Embedding model: `text-embedding-3-small`
68
70
- Chat model: `gpt-4o`, version `2024-08-06`
69
71
70
-
### Configure environment
72
+
### Configure environment
71
73
72
74
Create a `.env` file starting from the `.env.sample` file:
73
75
@@ -79,14 +81,11 @@ Create a `.env` file starting from the `.env.sample` file:
79
81
80
82
### Database
81
83
82
-
Since the database is using the new `vector` data type, you need use Azure SQL (you can use the [Free offer](https://learn.microsoft.com/en-us/azure/azure-sql/database/free-offer?view=azuresql)) or just announced [SQL database in Microsoft Fabric (Public Preview)](https://aka.ms/announcingsqlfabric) or the [SQL Server 2025 (EAP)](https://aka.ms/sqleapsignup).
83
-
84
-
> [!NOTE]
85
-
> Vector Functions are in Public Preview. Learn the details about vectors in Azure SQL here: https://aka.ms/azure-sql-vector-public-preview
84
+
Since the database is using the new `vector` data type, you need use Azure SQL (you can use the [Free offer](https://learn.microsoft.com/azure/azure-sql/database/free-offer?view=azuresql)) or just announced [SQL database in Microsoft Fabric (Public Preview)](https://aka.ms/announcingsqlfabric) or the [SQL Server 2025 (RC)](https://learn.microsoft.com/sql/sql-server/what-s-new-in-sql-server-2025?view=sql-server-ver17).
86
85
87
86
To deploy the database, make sure you have created the `.env` file as explained in the previoud section, and then run the following command:
88
87
89
-
```bash
88
+
```bash
90
89
dotnet run --project ./db
91
90
```
92
91
@@ -112,15 +111,21 @@ Once the database has been deployed, you can run the full-stack application loca
112
111
cd client && npm install &&cd ..
113
112
```
114
113
115
-
Then, you can run the application locally using the Static Web Apps CLI. Make sure you have the `.env` file created as explained in the previous section, and then run the following command:
114
+
Run the back-end API using Data API builder. Make sure you have created the `.env` file as explained in the previous section, and then run the following Powershell command:
115
+
116
+
```powershell
117
+
dab start --config .\dab\dab-config.development.json
118
+
```
119
+
120
+
Then, you can run the application locally using the Static Web Apps CLI. Make sure you have the `.env` file created as explained in the previous section, and then run the following command in a new terminal window:
116
121
117
122
```bash
118
123
swa start
119
124
```
120
125
121
126
Once the application is running, you can access it at `http://localhost:4280`.
122
127
123
-
Data API builder may take a few seconds to run if you are using Azure SQL and EntraID authentication. You can check if Data API builde is running by accessing `http://localhost:4280/data-api/rest/countSamples`.
128
+
Data API builder may take a few seconds to run if you are using Azure SQL and EntraID authentication. You can check if Data API builde is running by accessing `http://localhost:4280/api/countSamples`.
0 commit comments