Share via


AzureSearchChatExtensionParameters Class

  • java.lang.Object
    • com.azure.ai.openai.models.AzureSearchChatExtensionParameters

Implements

public final class AzureSearchChatExtensionParameters
implements JsonSerializable<AzureSearchChatExtensionParameters>

Parameters for Azure Cognitive Search when used as an Azure OpenAI chat extension. The supported authentication types are APIKey, SystemAssignedManagedIdentity and UserAssignedManagedIdentity.

Constructor Summary

Constructor Description
AzureSearchChatExtensionParameters(String endpoint, String indexName)

Creates an instance of AzureSearchChatExtensionParameters class.

Method Summary

Modifier and Type Method and Description
static AzureSearchChatExtensionParameters fromJson(JsonReader jsonReader)

Reads an instance of AzureSearchChatExtensionParameters from the JsonReader.

OnYourDataAuthenticationOptions getAuthentication()

Get the authentication property: The authentication method to use when accessing the defined data source.

OnYourDataVectorizationSource getEmbeddingDependency()

Get the embeddingDependency property: The embedding dependency for vector search.

String getEndpoint()

Get the endpoint property: The absolute endpoint path for the Azure Cognitive Search resource to use.

AzureSearchIndexFieldMappingOptions getFieldsMapping()

Get the fieldsMapping property: Customized field mapping behavior to use when interacting with the search index.

String getFilter()

Get the filter property: Search filter.

List<OnYourDataContextProperty> getIncludeContexts()

Get the includeContexts property: The included properties of the output context.

String getIndexName()

Get the indexName property: The name of the index to use as available in the referenced Azure Cognitive Search resource.

Integer getMaxSearchQueries()

Get the maxSearchQueries property: The max number of rewritten queries should be send to search provider for one user message.

AzureSearchQueryType getQueryType()

Get the queryType property: The query type to use with Azure Cognitive Search.

String getSemanticConfiguration()

Get the semanticConfiguration property: The additional semantic configuration for the query.

Integer getStrictness()

Get the strictness property: The configured strictness of the search relevance filtering.

Integer getTopNDocuments()

Get the topNDocuments property: The configured top number of documents to feature for the configured query.

Boolean 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.

Boolean isInScope()

Get the inScope property: Whether queries should be restricted to use of indexed data.

AzureSearchChatExtensionParameters 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.

AzureSearchChatExtensionParameters setAuthentication(OnYourDataAuthenticationOptions authentication)

Set the authentication property: The authentication method to use when accessing the defined data source.

AzureSearchChatExtensionParameters setEmbeddingDependency(OnYourDataVectorizationSource embeddingDependency)

Set the embeddingDependency property: The embedding dependency for vector search.

AzureSearchChatExtensionParameters setFieldsMapping(AzureSearchIndexFieldMappingOptions fieldsMapping)

Set the fieldsMapping property: Customized field mapping behavior to use when interacting with the search index.

AzureSearchChatExtensionParameters setFilter(String filter)

Set the filter property: Search filter.

AzureSearchChatExtensionParameters setIncludeContexts(List<OnYourDataContextProperty> includeContexts)

Set the includeContexts property: The included properties of the output context.

AzureSearchChatExtensionParameters setInScope(Boolean inScope)

Set the inScope property: Whether queries should be restricted to use of indexed data.

AzureSearchChatExtensionParameters setMaxSearchQueries(Integer maxSearchQueries)

Set the maxSearchQueries property: The max number of rewritten queries should be send to search provider for one user message.

AzureSearchChatExtensionParameters setQueryType(AzureSearchQueryType queryType)

Set the queryType property: The query type to use with Azure Cognitive Search.

AzureSearchChatExtensionParameters setSemanticConfiguration(String semanticConfiguration)

Set the semanticConfiguration property: The additional semantic configuration for the query.

AzureSearchChatExtensionParameters setStrictness(Integer strictness)

Set the strictness property: The configured strictness of the search relevance filtering.

AzureSearchChatExtensionParameters setTopNDocuments(Integer topNDocuments)

Set the topNDocuments property: The configured top number of documents to feature for the configured query.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

AzureSearchChatExtensionParameters

public AzureSearchChatExtensionParameters(String endpoint, String indexName)

Creates an instance of AzureSearchChatExtensionParameters class.

Parameters:

endpoint - the endpoint value to set.
indexName - the indexName value to set.

Method Details

fromJson

public static AzureSearchChatExtensionParameters fromJson(JsonReader jsonReader)

Reads an instance of AzureSearchChatExtensionParameters from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AzureSearchChatExtensionParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getAuthentication

public OnYourDataAuthenticationOptions 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.

getEmbeddingDependency

public OnYourDataVectorizationSource getEmbeddingDependency()

Get the embeddingDependency property: The embedding dependency for vector search.

Returns:

the embeddingDependency value.

getEndpoint

public String getEndpoint()

Get the endpoint property: The absolute endpoint path for the Azure Cognitive Search resource to use.

Returns:

the endpoint value.

getFieldsMapping

public AzureSearchIndexFieldMappingOptions getFieldsMapping()

Get the fieldsMapping property: Customized field mapping behavior to use when interacting with the search index.

Returns:

the fieldsMapping value.

getFilter

public String getFilter()

Get the filter property: Search filter.

Returns:

the filter value.

getIncludeContexts

public List 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.

getIndexName

public String getIndexName()

Get the indexName property: The name of the index to use as available in the referenced Azure Cognitive Search resource.

Returns:

the indexName value.

getMaxSearchQueries

public Integer 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.

getQueryType

public AzureSearchQueryType getQueryType()

Get the queryType property: The query type to use with Azure Cognitive Search.

Returns:

the queryType value.

getSemanticConfiguration

public String getSemanticConfiguration()

Get the semanticConfiguration property: The additional semantic configuration for the query.

Returns:

the semanticConfiguration value.

getStrictness

public Integer 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.

getTopNDocuments

public Integer getTopNDocuments()

Get the topNDocuments property: The configured top number of documents to feature for the configured query.

Returns:

the topNDocuments value.

isAllowPartialResult

public Boolean 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.

isInScope

public Boolean isInScope()

Get the inScope property: Whether queries should be restricted to use of indexed data.

Returns:

the inScope value.

setAllowPartialResult

public AzureSearchChatExtensionParameters 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. 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 AzureSearchChatExtensionParameters object itself.

setAuthentication

public AzureSearchChatExtensionParameters 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 AzureSearchChatExtensionParameters object itself.

setEmbeddingDependency

public AzureSearchChatExtensionParameters setEmbeddingDependency(OnYourDataVectorizationSource embeddingDependency)

Set the embeddingDependency property: The embedding dependency for vector search.

Parameters:

embeddingDependency - the embeddingDependency value to set.

Returns:

the AzureSearchChatExtensionParameters object itself.

setFieldsMapping

public AzureSearchChatExtensionParameters setFieldsMapping(AzureSearchIndexFieldMappingOptions fieldsMapping)

Set the fieldsMapping property: Customized field mapping behavior to use when interacting with the search index.

Parameters:

fieldsMapping - the fieldsMapping value to set.

Returns:

the AzureSearchChatExtensionParameters object itself.

setFilter

public AzureSearchChatExtensionParameters setFilter(String filter)

Set the filter property: Search filter.

Parameters:

filter - the filter value to set.

Returns:

the AzureSearchChatExtensionParameters object itself.

setIncludeContexts

public AzureSearchChatExtensionParameters setIncludeContexts(List 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 AzureSearchChatExtensionParameters object itself.

setInScope

public AzureSearchChatExtensionParameters setInScope(Boolean inScope)

Set the inScope property: Whether queries should be restricted to use of indexed data.

Parameters:

inScope - the inScope value to set.

Returns:

the AzureSearchChatExtensionParameters object itself.

setMaxSearchQueries

public AzureSearchChatExtensionParameters setMaxSearchQueries(Integer maxSearchQueries)

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 AzureSearchChatExtensionParameters object itself.

setQueryType

public AzureSearchChatExtensionParameters setQueryType(AzureSearchQueryType queryType)

Set the queryType property: The query type to use with Azure Cognitive Search.

Parameters:

queryType - the queryType value to set.

Returns:

the AzureSearchChatExtensionParameters object itself.

setSemanticConfiguration

public AzureSearchChatExtensionParameters setSemanticConfiguration(String semanticConfiguration)

Set the semanticConfiguration property: The additional semantic configuration for the query.

Parameters:

semanticConfiguration - the semanticConfiguration value to set.

Returns:

the AzureSearchChatExtensionParameters object itself.

setStrictness

public AzureSearchChatExtensionParameters setStrictness(Integer strictness)

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 AzureSearchChatExtensionParameters object itself.

setTopNDocuments

public AzureSearchChatExtensionParameters setTopNDocuments(Integer topNDocuments)

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 AzureSearchChatExtensionParameters object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to