Class ElasticsearchChatExtensionParameters

java.lang.Object
com.azure.ai.openai.models.ElasticsearchChatExtensionParameters
All Implemented Interfaces:
com.azure.json.JsonSerializable<ElasticsearchChatExtensionParameters>

public final class ElasticsearchChatExtensionParameters extends Object implements com.azure.json.JsonSerializable<ElasticsearchChatExtensionParameters>
Parameters to use when configuring Elasticsearch® as an Azure OpenAI chat extension. The supported authentication types are KeyAndKeyId and EncodedAPIKey.
  • Constructor Details

    • ElasticsearchChatExtensionParameters

      public ElasticsearchChatExtensionParameters(String endpoint, String indexName)
      Creates an instance of ElasticsearchChatExtensionParameters class.
      Parameters:
      endpoint - the endpoint value to set.
      indexName - the indexName value to set.
  • Method Details

    • 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.
    • setAuthentication

      public ElasticsearchChatExtensionParameters 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 ElasticsearchChatExtensionParameters object itself.
    • getTopNDocuments

      public Integer getTopNDocuments()
      Get the topNDocuments property: The configured top number of documents to feature for the configured query.
      Returns:
      the topNDocuments value.
    • setTopNDocuments

      public ElasticsearchChatExtensionParameters 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 ElasticsearchChatExtensionParameters object itself.
    • isInScope

      public Boolean isInScope()
      Get the inScope property: Whether queries should be restricted to use of indexed data.
      Returns:
      the inScope value.
    • setInScope

      public ElasticsearchChatExtensionParameters 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 ElasticsearchChatExtensionParameters object itself.
    • 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.
    • setStrictness

      public ElasticsearchChatExtensionParameters 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 ElasticsearchChatExtensionParameters object itself.
    • getRoleInformation

      public String getRoleInformation()
      Get the roleInformation property: Give the model instructions about how it should behave and any context it should reference when generating a response. You can describe the assistant's personality and tell it how to format responses. There's a 100 token limit for it, and it counts against the overall token limit.
      Returns:
      the roleInformation value.
    • setRoleInformation

      public ElasticsearchChatExtensionParameters setRoleInformation(String roleInformation)
      Set the roleInformation property: Give the model instructions about how it should behave and any context it should reference when generating a response. You can describe the assistant's personality and tell it how to format responses. There's a 100 token limit for it, and it counts against the overall token limit.
      Parameters:
      roleInformation - the roleInformation value to set.
      Returns:
      the ElasticsearchChatExtensionParameters object itself.
    • getEndpoint

      public String getEndpoint()
      Get the endpoint property: The endpoint of Elasticsearch®.
      Returns:
      the endpoint value.
    • getIndexName

      public String getIndexName()
      Get the indexName property: The index name of Elasticsearch®.
      Returns:
      the indexName value.
    • getFieldsMapping

      public ElasticsearchIndexFieldMappingOptions getFieldsMapping()
      Get the fieldsMapping property: The index field mapping options of Elasticsearch®.
      Returns:
      the fieldsMapping value.
    • setFieldsMapping

      Set the fieldsMapping property: The index field mapping options of Elasticsearch®.
      Parameters:
      fieldsMapping - the fieldsMapping value to set.
      Returns:
      the ElasticsearchChatExtensionParameters object itself.
    • getQueryType

      public ElasticsearchQueryType getQueryType()
      Get the queryType property: The query type of Elasticsearch®.
      Returns:
      the queryType value.
    • setQueryType

      Set the queryType property: The query type of Elasticsearch®.
      Parameters:
      queryType - the queryType value to set.
      Returns:
      the ElasticsearchChatExtensionParameters object itself.
    • getEmbeddingDependency

      public OnYourDataVectorizationSource getEmbeddingDependency()
      Get the embeddingDependency property: The embedding dependency for vector search.
      Returns:
      the embeddingDependency value.
    • setEmbeddingDependency

      public ElasticsearchChatExtensionParameters setEmbeddingDependency(OnYourDataVectorizationSource embeddingDependency)
      Set the embeddingDependency property: The embedding dependency for vector search.
      Parameters:
      embeddingDependency - the embeddingDependency value to set.
      Returns:
      the ElasticsearchChatExtensionParameters object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ElasticsearchChatExtensionParameters>
      Throws:
      IOException
    • fromJson

      public static ElasticsearchChatExtensionParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ElasticsearchChatExtensionParameters from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ElasticsearchChatExtensionParameters 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 ElasticsearchChatExtensionParameters.
    • 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.
    • setMaxSearchQueries

      public ElasticsearchChatExtensionParameters 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 ElasticsearchChatExtensionParameters object itself.
    • 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.
    • setAllowPartialResult

      public ElasticsearchChatExtensionParameters 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 ElasticsearchChatExtensionParameters object itself.
    • getIncludeContexts

      public List<OnYourDataContextProperty> 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 ElasticsearchChatExtensionParameters 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 ElasticsearchChatExtensionParameters object itself.