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
+32-4Lines changed: 32 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ This repo contains sample code for a simple chat webapp that integrates with Azu
10
10
- Elasticsearch index (preview)
11
11
- Pinecone index (private preview)
12
12
- Azure SQL Server (private preview)
13
+
- Mongo DB (preview)
13
14
14
15
## Configure the app
15
16
@@ -59,9 +60,6 @@ Please see the [section below](#add-an-identity-provider) for important informat
59
60
60
61
3. You can see the local running app at http://127.0.0.1:50505.
61
62
62
-
NOTE: You may find you need to set: MacOS: `export NODE_OPTIONS="--max-old-space-size=8192"` or Windows: `set NODE_OPTIONS=--max-old-space-size=8192` to avoid running out of memory when building the frontend.
63
-
64
-
65
63
### Deploy with the Azure CLI
66
64
67
65
#### Create the Azure App Service
@@ -283,6 +281,34 @@ Note: RBAC assignments can take a few minutes before becoming effective.
283
281
-`AZURE_OPENAI_EMBEDDING_NAME`: the name of your Ada (text-embedding-ada-002) model deployment on your Azure OpenAI resource.
284
282
-`PINECONE_VECTOR_COLUMNS`: the vector columns in your index to use when searching. Join them with `|` like `contentVector|titleVector`.
285
283
284
+
#### Chat with your data using Mongo DB (Private Preview)
285
+
286
+
1. Update the `AZURE_OPENAI_*` environment variables as described in the [basic chat experience](#basic-chat-experience) above.
287
+
288
+
2. To connect to your data, you need to specify an Mongo DB database configuration. Learn more about [MongoDB](https://www.mongodb.com/).
289
+
290
+
3. Configure data source settings as described in the table below.
|MONGODB_CONNECTION_STRING|Yes||The connection string used to connect to your Mongo DB instance|
296
+
|MONGODB_VECTOR_INDEX|Yes||The name of your Mongo DB vector index|
297
+
|MONGODB_DATABASE_NAME|Yes||The name of your Mongo DB database|
298
+
|MONGODB_CONTAINER_NAME|Yes||The name of your Mongo DB container|
299
+
|MONGODB_TOP_K|No|5|The number of documents to retrieve when querying your search index.|
300
+
|MONGODB_ENABLE_IN_DOMAIN|No|True|Limits responses to only queries relating to your data.|
301
+
|MONGODB_STRICTNESS|No|3|Integer from 1 to 5 specifying the strictness for the model limiting responses to your data.|
302
+
|MONGODB_CONTENT_COLUMNS|No||List of fields in your search index that contains the text content of your documents to use when formulating a bot response. Represent these as a string joined with "|", e.g. `"product_description|product_manual"`|
303
+
|MONGODB_FILENAME_COLUMN|No|| Field from your search index that gives a unique identifier of the source of your data to display in the UI.|
304
+
|MONGODB_TITLE_COLUMN|No||Field from your search index that gives a relevant title or header for your data content to display in the UI.|
305
+
|MONGODB_URL_COLUMN|No||Field from your search index that contains a URL for the document, e.g. an Azure Blob Storage URI. This value is not currently used.|
306
+
|MONGODB_VECTOR_COLUMNS|No||List of fields in your search index that contain vector embeddings of your documents to use when formulating a bot response. Represent these as a string joined with "|", e.g. `"product_description|product_manual"`|
307
+
308
+
MongoDB uses vector search by default, so ensure these settings are configured on your app:
309
+
-`AZURE_OPENAI_EMBEDDING_NAME`: the name of your Ada (text-embedding-ada-002) model deployment on your Azure OpenAI resource.
310
+
-`MONGODB_VECTOR_COLUMNS`: the vector columns in your index to use when searching. Join them with `|` like `contentVector|titleVector`.
311
+
286
312
#### Chat with your data using Azure SQL Server (Private Preview)
287
313
288
314
1. Update the `AZURE_OPENAI_*` environment variables as described in the [basic chat experience](#basic-chat-experience) above.
@@ -296,6 +322,9 @@ Note: RBAC assignments can take a few minutes before becoming effective.
296
322
|DATASOURCE_TYPE|Yes||Must be set to `AzureSqlServer`|
297
323
|AZURE_SQL_SERVER_CONNECTION_STRING|Yes||The connection string to use to connect to your Azure SQL Server instance|
298
324
|AZURE_SQL_SERVER_TABLE_SCHEMA|Yes||The table schema for your Azure SQL Server table. Must be surrounded by double quotes (`"`).|
325
+
|AZURE_SQL_SERVER_PORT||Not publicly available at this time.|The port to use to connect to your Azure SQL Server instance.|
326
+
|AZURE_SQL_SERVER_DATABASE_NAME||Not publicly available at this time.|
327
+
|AZURE_SQL_SERVER_DATABASE_SERVER||Not publicly available at this time.|
299
328
300
329
#### Chat with your data using Promptflow
301
330
@@ -391,7 +420,6 @@ We recommend keeping these best practices in mind:
391
420
392
421
**A note on Azure OpenAI API versions**: The application code in this repo will implement the request and response contracts for the most recent preview API version supported for Azure OpenAI. To keep your application up-to-date as the Azure OpenAI API evolves with time, be sure to merge the latest API version update into your own application code and redeploy using the methods described in this document.
393
422
394
-
395
423
## Contributing
396
424
397
425
This project welcomes contributions and suggestions. Most contributions require you to agree to a
0 commit comments