Class KnowledgeBase

java.lang.Object
com.azure.search.documents.indexes.models.KnowledgeBase
All Implemented Interfaces:
com.azure.json.JsonSerializable<KnowledgeBase>

public final class KnowledgeBase extends Object implements com.azure.json.JsonSerializable<KnowledgeBase>
The KnowledgeBase model.
  • Constructor Details

    • KnowledgeBase

      public KnowledgeBase(String name, List<KnowledgeSourceReference> knowledgeSources)
      Creates an instance of KnowledgeBase class.
      Parameters:
      name - the name value to set.
      knowledgeSources - the knowledgeSources value to set.
  • Method Details

    • getName

      public String getName()
      Get the name property: The name of the knowledge knowledge base.
      Returns:
      the name value.
    • getKnowledgeSources

      public List<KnowledgeSourceReference> getKnowledgeSources()
      Get the knowledgeSources property: The knowledgeSources property.
      Returns:
      the knowledgeSources value.
    • getModels

      public List<KnowledgeBaseModel> getModels()
      Get the models property: Contains configuration options on how to connect to AI models.
      Returns:
      the models value.
    • setModels

      public KnowledgeBase setModels(List<KnowledgeBaseModel> models)
      Set the models property: Contains configuration options on how to connect to AI models.
      Parameters:
      models - the models value to set.
      Returns:
      the KnowledgeBase object itself.
    • getRetrievalReasoningEffort

      public KnowledgeRetrievalReasoningEffort getRetrievalReasoningEffort()
      Get the retrievalReasoningEffort property: The retrievalReasoningEffort property.
      Returns:
      the retrievalReasoningEffort value.
    • setRetrievalReasoningEffort

      public KnowledgeBase setRetrievalReasoningEffort(KnowledgeRetrievalReasoningEffort retrievalReasoningEffort)
      Set the retrievalReasoningEffort property: The retrievalReasoningEffort property.
      Parameters:
      retrievalReasoningEffort - the retrievalReasoningEffort value to set.
      Returns:
      the KnowledgeBase object itself.
    • getOutputMode

      public KnowledgeRetrievalOutputMode getOutputMode()
      Get the outputMode property: The output configuration for this retrieval.
      Returns:
      the outputMode value.
    • setOutputMode

      public KnowledgeBase setOutputMode(KnowledgeRetrievalOutputMode outputMode)
      Set the outputMode property: The output configuration for this retrieval.
      Parameters:
      outputMode - the outputMode value to set.
      Returns:
      the KnowledgeBase object itself.
    • getETag

      public String getETag()
      Get the eTag property: The ETag of the knowledge base.
      Returns:
      the eTag value.
    • setETag

      public KnowledgeBase setETag(String eTag)
      Set the eTag property: The ETag of the knowledge base.
      Parameters:
      eTag - the eTag value to set.
      Returns:
      the KnowledgeBase object itself.
    • getEncryptionKey

      public SearchResourceEncryptionKey getEncryptionKey()
      Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your knowledge base definition when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your knowledge base definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your knowledge base definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.
      Returns:
      the encryptionKey value.
    • setEncryptionKey

      public KnowledgeBase setEncryptionKey(SearchResourceEncryptionKey encryptionKey)
      Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your knowledge base definition when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your knowledge base definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your knowledge base definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.
      Parameters:
      encryptionKey - the encryptionKey value to set.
      Returns:
      the KnowledgeBase object itself.
    • getDescription

      public String getDescription()
      Get the description property: The description of the knowledge base.
      Returns:
      the description value.
    • setDescription

      public KnowledgeBase setDescription(String description)
      Set the description property: The description of the knowledge base.
      Parameters:
      description - the description value to set.
      Returns:
      the KnowledgeBase object itself.
    • getRetrievalInstructions

      public String getRetrievalInstructions()
      Get the retrievalInstructions property: Instructions considered by the knowledge knowledge base when developing query plan.
      Returns:
      the retrievalInstructions value.
    • setRetrievalInstructions

      public KnowledgeBase setRetrievalInstructions(String retrievalInstructions)
      Set the retrievalInstructions property: Instructions considered by the knowledge knowledge base when developing query plan.
      Parameters:
      retrievalInstructions - the retrievalInstructions value to set.
      Returns:
      the KnowledgeBase object itself.
    • getAnswerInstructions

      public String getAnswerInstructions()
      Get the answerInstructions property: Instructions considered by the knowledge knowledge base when generating answers.
      Returns:
      the answerInstructions value.
    • setAnswerInstructions

      public KnowledgeBase setAnswerInstructions(String answerInstructions)
      Set the answerInstructions property: Instructions considered by the knowledge knowledge base when generating answers.
      Parameters:
      answerInstructions - the answerInstructions value to set.
      Returns:
      the KnowledgeBase 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<KnowledgeBase>
      Throws:
      IOException
    • fromJson

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