Class MongoDBChatExtensionParameters

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

public final class MongoDBChatExtensionParameters extends Object implements com.azure.json.JsonSerializable<MongoDBChatExtensionParameters>
Parameters for the MongoDB chat extension. The supported authentication types are AccessToken, SystemAssignedManagedIdentity and UserAssignedManagedIdentity.
  • Constructor Details

    • MongoDBChatExtensionParameters

      public MongoDBChatExtensionParameters(String endpoint, String collectionName, String databaseName, String appName, String indexName, MongoDBChatExtensionParametersFieldsMapping fieldsMapping, com.azure.core.util.BinaryData embeddingDependency)
      Creates an instance of MongoDBChatExtensionParameters class.
      Parameters:
      endpoint - the endpoint value to set.
      collectionName - the collectionName value to set.
      databaseName - the databaseName value to set.
      appName - the appName 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.
    • 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters object itself.
    • 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters 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 MongoDBChatExtensionParameters object itself.
    • getEndpoint

      public String getEndpoint()
      Get the endpoint property: The endpoint name for MongoDB.
      Returns:
      the endpoint value.
    • getCollectionName

      public String getCollectionName()
      Get the collectionName property: The collection name for MongoDB.
      Returns:
      the collectionName value.
    • getDatabaseName

      public String getDatabaseName()
      Get the databaseName property: The database name for MongoDB.
      Returns:
      the databaseName value.
    • getAppName

      public String getAppName()
      Get the appName property: The app name for MongoDB.
      Returns:
      the appName value.
    • getFieldsMapping

      Get the fieldsMapping property: Field mappings to apply to data used by the MongoDB data source. Note that content and vector field mappings are required for MongoDB.
      Returns:
      the fieldsMapping value.
    • getEmbeddingDependency

      public com.azure.core.util.BinaryData getEmbeddingDependency()
      Get the embeddingDependency property: The vectorization source to use with the MongoDB chat extension.
      Returns:
      the embeddingDependency value.
    • toJson

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

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

      public String getIndexName()
      Get the indexName property: The name of the MongoDB index.
      Returns:
      the indexName value.
    • setAuthentication

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