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
You can make requests using [Azure AI Search](./concepts/use-your-data.md?tabs=ai-search#ingesting-your-data) and [Azure Cosmos DB for MongoDB vCore](./concepts/use-your-data.md?tabs=mongo-db#ingesting-your-data).
364
+
You can make requests using [Azure AI Search](./concepts/use-your-data.md?tabs=ai-search#ingesting-your-data), [Azure Cosmos DB for MongoDB vCore](./concepts/use-your-data.md?tabs=mongo-db#ingesting-your-data), [Azure Machine learning](/azure/machine-learning/overview-what-is-azure-machine-learning), [Pinecone](https://www.pinecone.io/), and [Elasticsearch](https://www.elastic.co/).
365
365
366
366
##### Azure AI Search
367
367
@@ -441,6 +441,123 @@ curl -i -X POST YOUR_RESOURCE_NAME/openai/deployments/YOUR_DEPLOYMENT_NAME/exten
441
441
'
442
442
```
443
443
444
+
##### Elasticsearch
445
+
446
+
```console
447
+
curl -i -X POST YOUR_RESOURCE_NAME/openai/deployments/YOUR_DEPLOYMENT_NAME/extensions/chat/completions?api-version=2023-12-01-preview \
448
+
-H "Content-Type: application/json" \
449
+
-H "api-key: YOUR_API_KEY" \
450
+
-d \
451
+
{
452
+
"messages": [
453
+
{
454
+
"role": "system",
455
+
"content": "you are a helpful assistant that talks like a pirate"
456
+
},
457
+
{
458
+
"role": "user",
459
+
"content": "can you tell me how to care for a parrot?"
460
+
}
461
+
],
462
+
"dataSources": [
463
+
{
464
+
"type": "Elasticsearch",
465
+
"parameters": {
466
+
"endpoint": "{search endpoint}",
467
+
"indexName": "{index name}",
468
+
"authentication": {
469
+
"type": "KeyAndKeyId",
470
+
"key": "{key}",
471
+
"keyId": "{key id}"
472
+
}
473
+
}
474
+
}
475
+
]
476
+
}
477
+
```
478
+
479
+
##### Azure Machine Learning
480
+
481
+
```console
482
+
curl -i -X POST YOUR_RESOURCE_NAME/openai/deployments/YOUR_DEPLOYMENT_NAME/extensions/chat/completions?api-version=2023-12-01-preview \
483
+
-H "Content-Type: application/json" \
484
+
-H "api-key: YOUR_API_KEY" \
485
+
-d \
486
+
'
487
+
{
488
+
"messages": [
489
+
{
490
+
"role": "system",
491
+
"content": "you are a helpful assistant that talks like a pirate"
492
+
},
493
+
{
494
+
"role": "user",
495
+
"content": "can you tell me how to care for a parrot?"
|`type`| string | Required | null | The data source to be used for the Azure OpenAI on your data feature. For Azure AI Search the value is `AzureCognitiveSearch`. For Azure Cosmos DB for MongoDB vCore, the value is `AzureCosmosDB`. |
606
+
|`type`| string | Required | null | The data source to be used for the Azure OpenAI on your data feature. For Azure AI Search the value is `AzureCognitiveSearch`. For Azure Cosmos DB for MongoDB vCore, the value is `AzureCosmosDB`. For Elasticsearch the value is `Elasticsearch`. For Azure Machine Learning, the value is `AzureMLIndex`. For Pinecone, the value is `Pinecone`. |
488
607
|`indexName`| string | Required | null | The search index to be used. |
489
608
|`inScope`| boolean | Optional | true | If set, this value will limit responses specific to the grounding data content. |
490
609
|`topNDocuments`| number | Optional | 5 | Specifies the number of top-scoring documents from your data index used to generate responses. You might want to increase the value when you have short documents or want to provide more context. This is the *retrieved documents* parameter in Azure OpenAI studio. |
@@ -497,7 +616,9 @@ The following parameters can be used inside of the `parameters` field inside of
497
616
|`strictness`| number | Optional | 3 | Sets the threshold to categorize documents as relevant to your queries. Raising the value means a higher threshold for relevance and filters out more less-relevant documents for responses. Setting this value too high might cause the model to fail to generate responses due to limited available documents. |
498
617
499
618
500
-
**The following parameters are used for Azure AI Search**
619
+
### Azure AI Search parameters
620
+
621
+
The following parameters are used for Azure AI Search.
@@ -506,6 +627,20 @@ The following parameters can be used inside of the `parameters` field inside of
506
627
|`queryType`| string | Optional | simple | Indicates which query option will be used for Azure AI Search. Available types: `simple`, `semantic`, `vector`, `vectorSimpleHybrid`, `vectorSemanticHybrid`. |
507
628
|`fieldsMapping`| dictionary | Optional for Azure AI Search. | null | defines which [fields](./concepts/use-your-data.md?tabs=ai-search#index-field-mapping) you want to map when you add your data source. |
508
629
630
+
The following parameters are used inside of the `authentication` field, which enables you to use Azure OpenAI [without public network access](./how-to/use-your-data-securely.md).
@@ -514,7 +649,7 @@ The following parameters are used inside of the `fieldsMapping` field.
514
649
|`urlField`| string | Optional | null | The field in your index that contains the original URL of each document. |
515
650
|`filepathField`| string | Optional | null | The field in your index that contains the original file name of each document. |
516
651
|`contentFields`| dictionary | Optional | null | The fields in your index that contain the main text content of each document. |
517
-
|`contentFieldsSeparator`| string | Optional | null | The separator for the your content fields. Use `\n` by default. |
652
+
|`contentFieldsSeparator`| string | Optional | null | The separator for the content fields. Use `\n` by default. |
518
653
519
654
```json
520
655
"fieldsMapping": {
@@ -528,7 +663,23 @@ The following parameters are used inside of the `fieldsMapping` field.
528
663
}
529
664
```
530
665
531
-
**The following parameters are used for Azure Cosmos DB for MongoDB vCore**
666
+
The following parameters are used inside of the optional `embeddingDependency` parameter, which contains details of a vectorization source that is based on an internal embeddings model deployment name in the same Azure OpenAI resource.
|`deploymentName`| string | Optional | null | The type of vectorization source to use. |
671
+
|`type`| string | Optional | null | The embedding model deployment name, located within the same Azure OpenAI resource. This enables you to use vector search without an Azure OpenAI API key and without Azure OpenAI public network access. |
672
+
673
+
```json
674
+
"embeddingDependency": {
675
+
"type": "DeploymentName",
676
+
"deploymentName": "{embedding deployment name}"
677
+
},
678
+
```
679
+
680
+
### Azure CosmosDB for MongoDB vCore parameters
681
+
682
+
The following parameters are used for Azure Cosmos DB for MongoDB vCore.
@@ -538,7 +689,131 @@ The following parameters are used inside of the `fieldsMapping` field.
538
689
|`containerName`| string | Required | null | Azure Cosmos DB for MongoDB vCore only. The Azure Cosmos Mongo vCore container name in the database. |
539
690
|`type` (found inside of`embeddingDependencyType`) | string | Required | null | Indicates the embedding model dependency. |
540
691
|`deploymentName` (found inside of`embeddingDependencyType`) | string | Required | null | The embedding model deployment name. |
541
-
|`fieldsMapping`| dictionary | Required for Azure Cosmos DB for MongoDB vCore. | null | Index data column mapping. When using Azure Cosmos DB for MongoDB vCore, the value `vectorFields` is required, which indicates the fields that store vectors. |
692
+
|`fieldsMapping`| dictionary | Required for Azure Cosmos DB for MongoDB vCore. | null | Index data column mapping. When you use Azure Cosmos DB for MongoDB vCore, the value `vectorFields` is required, which indicates the fields that store vectors. |
693
+
694
+
The following parameters are used inside of the optional `embeddingDependency` parameter, which contains details of a vectorization source that is based on an internal embeddings model deployment name in the same Azure OpenAI resource.
|`deploymentName`| string | Optional | null | The type of vectorization source to use. |
699
+
|`type`| string | Optional | null | The embedding model deployment name, located within the same Azure OpenAI resource. This enables you to use vector search without an Azure OpenAI API key and without Azure OpenAI public network access. |
700
+
701
+
```json
702
+
"embeddingDependency": {
703
+
"type": "DeploymentName",
704
+
"deploymentName": "{embedding deployment name}"
705
+
},
706
+
```
707
+
708
+
### Elasticsearch parameters
709
+
710
+
The following parameters are used for Elasticsearch.
|`endpoint`| string | Required | null | The endpoint for connecting to Elasticsearch. |
715
+
|`indexName`| string | Required | null | The name of the Elasticsearch index. |
716
+
|`type` (found inside of `authentication`) | string | Required | null | The authentication to be used. For Elasticsearch, the value is `KeyAndKeyId`. |
717
+
|`key` (found inside of `authentication`) | string | Required | null | The key used to connect to Elasticsearch. |
718
+
|`keyId` (found inside of `authentication`) | string | Required | null | The key ID to be used. For Elasticsearch. |
719
+
720
+
The following parameters are used inside of the `fieldsMapping` field.
|`titleField`| string | Optional | null | The field in your index that contains the original title of each document. |
725
+
|`urlField`| string | Optional | null | The field in your index that contains the original URL of each document. |
726
+
|`filepathField`| string | Optional | null | The field in your index that contains the original file name of each document. |
727
+
|`contentFields`| dictionary | Optional | null | The fields in your index that contain the main text content of each document. |
728
+
|`contentFieldsSeparator`| string | Optional | null | The separator for the content fields. Use `\n` by default. |
729
+
|`vectorFields`| dictionary | Optional | null | The names of fields that represent vector data |
730
+
731
+
```json
732
+
"fieldsMapping": {
733
+
"titleField": "myTitleField",
734
+
"urlField": "myUrlField",
735
+
"filepathField": "myFilePathField",
736
+
"contentFields": [
737
+
"myContentField"
738
+
],
739
+
"contentFieldsSeparator": "\n",
740
+
"vectorFields": [
741
+
"myVectorField"
742
+
]
743
+
}
744
+
```
745
+
746
+
The following parameters are used inside of the optional `embeddingDependency` parameter, which contains details of a vectorization source that is based on an internal embeddings model deployment name in the same Azure OpenAI resource.
|`deploymentName`| string | Optional | null | The type of vectorization source to use. |
751
+
|`type`| string | Optional | null | The embedding model deployment name, located within the same Azure OpenAI resource. This enables you to use vector search without an Azure OpenAI API key and without Azure OpenAI public network access. |
752
+
753
+
```json
754
+
"embeddingDependency": {
755
+
"type": "DeploymentName",
756
+
"deploymentName": "{embedding deployment name}"
757
+
},
758
+
```
759
+
760
+
### Azure Machine Learning parameters
761
+
762
+
The following parameters are used for Azure Machine Learning.
|`name`| string | Required | null | The name of the Azure Machine Learning project name. |
768
+
|`version` (found inside of `authentication`) | string | Required | null | The version of the Azure Machine Learning vector index. |
769
+
770
+
The following parameters are used inside of the optional `embeddingDependency` parameter, which contains details of a vectorization source that is based on an internal embeddings model deployment name in the same Azure OpenAI resource.
|`deploymentName`| string | Optional | null | The type of vectorization source to use. |
775
+
|`type`| string | Optional | null | The embedding model deployment name, located within the same Azure OpenAI resource. This enables you to use vector search without an Azure OpenAI API key and without Azure OpenAI public network access. |
|`type` (found inside of `authentication`) | string | Required | null | The authentication to be used. For Pinecone, the value is `APIKey`. |
791
+
|`apiKey` (found inside of `authentication`) | string | Required | null | The API key for Pinecone. |
792
+
|`environment`| string | Required | null | The name of the Pinecone environment. |
793
+
|`indexName`| string | Required | null | The name of the Pinecone index. |
794
+
|`embeddingDependency`| string | Required | null | The embedding dependency for vector search. |
795
+
|`type` (found inside of `embeddingDependency`) | string | Required | null | The type of dependency. For Pinecone the value is `DeploymentName`. |
796
+
|`deploymentName` (found inside of `embeddingDependency`) | string | Required | null | The name of the deployment. |
797
+
|`titleField` (found inside of `fieldsMapping`) | string | Required | null | The name of the index field to use as a title. |
798
+
|`urlField` (found inside of `fieldsMapping`) | string | Required | null | The name of the index field to use as a URL. |
799
+
|`filepathField` (found inside of `fieldsMapping`) | string | Required | null | The name of the index field to use as a file path. |
800
+
|`contentFields` (found inside of `fieldsMapping`) | string | Required | null | The name of the index fields that should be treated as content. |
801
+
|`vectorFields`| dictionary | Optional | null | The names of fields that represent vector data |
802
+
|`contentFieldsSeparator` (found inside of `fieldsMapping`) | string | Required | null | The separator for the your content fields. Use `\n` by default. |
803
+
804
+
The following parameters are used inside of the optional `embeddingDependency` parameter, which contains details of a vectorization source that is based on an internal embeddings model deployment name in the same Azure OpenAI resource.
|`deploymentName`| string | Optional | null | The type of vectorization source to use. |
809
+
|`type`| string | Optional | null | The embedding model deployment name, located within the same Azure OpenAI resource. This enables you to use vector search without an Azure OpenAI API key and without Azure OpenAI public network access. |
0 commit comments