Package com.azure.ai.openai.models
Class AzureCosmosDBChatExtensionParameters
java.lang.Object
com.azure.ai.openai.models.AzureCosmosDBChatExtensionParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AzureCosmosDBChatExtensionParameters>
public final class AzureCosmosDBChatExtensionParameters
extends Object
implements com.azure.json.JsonSerializable<AzureCosmosDBChatExtensionParameters>
Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Azure Cosmos DB for
MongoDB vCore. The supported authentication type is ConnectionString.
-
Constructor Summary
ConstructorsConstructorDescriptionAzureCosmosDBChatExtensionParameters(String databaseName, String containerName, String indexName, AzureCosmosDBFieldMappingOptions fieldsMapping, OnYourDataVectorizationSource embeddingDependency) Creates an instance of AzureCosmosDBChatExtensionParameters class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AzureCosmosDBChatExtensionParameters from the JsonReader.Get the authentication property: The authentication method to use when accessing the defined data source.Get the containerName property: The name of the Azure Cosmos DB resource container.Get the databaseName property: The MongoDB vCore database name to use with Azure Cosmos DB.Get the embeddingDependency property: The embedding dependency for vector search.Get the fieldsMapping property: Customized field mapping behavior to use when interacting with the search index.Get the includeContexts property: The included properties of the output context.Get the indexName property: The MongoDB vCore index name to use with Azure Cosmos DB.Get the maxSearchQueries property: The max number of rewritten queries should be send to search provider for one user message.Get the strictness property: The configured strictness of the search relevance filtering.Get the topNDocuments property: The configured top number of documents to feature for the configured query.Get the allowPartialResult property: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail.Get the inScope property: Whether queries should be restricted to use of indexed data.setAllowPartialResult(Boolean allowPartialResult) Set the allowPartialResult property: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail.setAuthentication(OnYourDataAuthenticationOptions authentication) Set the authentication property: The authentication method to use when accessing the defined data source.setIncludeContexts(List<OnYourDataContextProperty> includeContexts) Set the includeContexts property: The included properties of the output context.setInScope(Boolean inScope) Set the inScope property: Whether queries should be restricted to use of indexed data.setMaxSearchQueries(Integer maxSearchQueries) Set the maxSearchQueries property: The max number of rewritten queries should be send to search provider for one user message.setStrictness(Integer strictness) Set the strictness property: The configured strictness of the search relevance filtering.setTopNDocuments(Integer topNDocuments) Set the topNDocuments property: The configured top number of documents to feature for the configured query.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
AzureCosmosDBChatExtensionParameters
public AzureCosmosDBChatExtensionParameters(String databaseName, String containerName, String indexName, AzureCosmosDBFieldMappingOptions fieldsMapping, OnYourDataVectorizationSource embeddingDependency) Creates an instance of AzureCosmosDBChatExtensionParameters class.- Parameters:
databaseName- the databaseName value to set.containerName- the containerName value to set.indexName- the indexName value to set.fieldsMapping- the fieldsMapping value to set.embeddingDependency- the embeddingDependency value to set.
-
-
Method Details
-
getAuthentication
Get the authentication property: The authentication method to use when accessing the defined data source. Each data source type supports a specific set of available authentication methods; please see the documentation of the data source for supported mechanisms. If not otherwise provided, On Your Data will attempt to use System Managed Identity (default credential) authentication.- Returns:
- the authentication value.
-
setAuthentication
public AzureCosmosDBChatExtensionParameters setAuthentication(OnYourDataAuthenticationOptions authentication) Set the authentication property: The authentication method to use when accessing the defined data source. Each data source type supports a specific set of available authentication methods; please see the documentation of the data source for supported mechanisms. If not otherwise provided, On Your Data will attempt to use System Managed Identity (default credential) authentication.- Parameters:
authentication- the authentication value to set.- Returns:
- the AzureCosmosDBChatExtensionParameters object itself.
-
getTopNDocuments
Get the topNDocuments property: The configured top number of documents to feature for the configured query.- Returns:
- the topNDocuments value.
-
setTopNDocuments
Set the topNDocuments property: The configured top number of documents to feature for the configured query.- Parameters:
topNDocuments- the topNDocuments value to set.- Returns:
- the AzureCosmosDBChatExtensionParameters object itself.
-
isInScope
Get the inScope property: Whether queries should be restricted to use of indexed data.- Returns:
- the inScope value.
-
setInScope
Set the inScope property: Whether queries should be restricted to use of indexed data.- Parameters:
inScope- the inScope value to set.- Returns:
- the AzureCosmosDBChatExtensionParameters object itself.
-
getStrictness
Get the strictness property: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.- Returns:
- the strictness value.
-
setStrictness
Set the strictness property: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.- Parameters:
strictness- the strictness value to set.- Returns:
- the AzureCosmosDBChatExtensionParameters object itself.
-
getDatabaseName
Get the databaseName property: The MongoDB vCore database name to use with Azure Cosmos DB.- Returns:
- the databaseName value.
-
getContainerName
Get the containerName property: The name of the Azure Cosmos DB resource container.- Returns:
- the containerName value.
-
getIndexName
Get the indexName property: The MongoDB vCore index name to use with Azure Cosmos DB.- Returns:
- the indexName value.
-
getFieldsMapping
Get the fieldsMapping property: Customized field mapping behavior to use when interacting with the search index.- Returns:
- the fieldsMapping value.
-
getEmbeddingDependency
Get the embeddingDependency property: The embedding dependency for vector search.- Returns:
- the embeddingDependency value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AzureCosmosDBChatExtensionParameters>- Throws:
IOException
-
fromJson
public static AzureCosmosDBChatExtensionParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AzureCosmosDBChatExtensionParameters from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AzureCosmosDBChatExtensionParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the AzureCosmosDBChatExtensionParameters.
-
getMaxSearchQueries
Get the maxSearchQueries property: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.- Returns:
- the maxSearchQueries value.
-
setMaxSearchQueries
Set the maxSearchQueries property: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.- Parameters:
maxSearchQueries- the maxSearchQueries value to set.- Returns:
- the AzureCosmosDBChatExtensionParameters object itself.
-
isAllowPartialResult
Get the allowPartialResult property: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.- Returns:
- the allowPartialResult value.
-
setAllowPartialResult
Set the allowPartialResult property: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.- Parameters:
allowPartialResult- the allowPartialResult value to set.- Returns:
- the AzureCosmosDBChatExtensionParameters object itself.
-
getIncludeContexts
Get the includeContexts property: The included properties of the output context. If not specified, the default value is `citations` and `intent`.- Returns:
- the includeContexts value.
-
setIncludeContexts
public AzureCosmosDBChatExtensionParameters setIncludeContexts(List<OnYourDataContextProperty> includeContexts) Set the includeContexts property: The included properties of the output context. If not specified, the default value is `citations` and `intent`.- Parameters:
includeContexts- the includeContexts value to set.- Returns:
- the AzureCosmosDBChatExtensionParameters object itself.
-