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 Summary
ConstructorsConstructorDescriptionKnowledgeBase(String name, List<KnowledgeSourceReference> knowledgeSources) Creates an instance of KnowledgeBase class. -
Method Summary
Modifier and TypeMethodDescriptionstatic KnowledgeBasefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of KnowledgeBase from the JsonReader.Get the answerInstructions property: Instructions considered by the knowledge knowledge base when generating answers.Get the description property: The description of the knowledge base.Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.getETag()Get the eTag property: The ETag of the knowledge base.Get the knowledgeSources property: The knowledgeSources property.Get the models property: Contains configuration options on how to connect to AI models.getName()Get the name property: The name of the knowledge knowledge base.Get the outputMode property: The output configuration for this retrieval.Get the retrievalInstructions property: Instructions considered by the knowledge knowledge base when developing query plan.Get the retrievalReasoningEffort property: The retrievalReasoningEffort property.setAnswerInstructions(String answerInstructions) Set the answerInstructions property: Instructions considered by the knowledge knowledge base when generating answers.setDescription(String description) Set the description property: The description of the knowledge base.setEncryptionKey(SearchResourceEncryptionKey encryptionKey) Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.Set the eTag property: The ETag of the knowledge base.setModels(List<KnowledgeBaseModel> models) Set the models property: Contains configuration options on how to connect to AI models.setOutputMode(KnowledgeRetrievalOutputMode outputMode) Set the outputMode property: The output configuration for this retrieval.setRetrievalInstructions(String retrievalInstructions) Set the retrievalInstructions property: Instructions considered by the knowledge knowledge base when developing query plan.setRetrievalReasoningEffort(KnowledgeRetrievalReasoningEffort retrievalReasoningEffort) Set the retrievalReasoningEffort property: The retrievalReasoningEffort property.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class 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
-
KnowledgeBase
Creates an instance of KnowledgeBase class.- Parameters:
name- the name value to set.knowledgeSources- the knowledgeSources value to set.
-
-
Method Details
-
getName
Get the name property: The name of the knowledge knowledge base.- Returns:
- the name value.
-
getKnowledgeSources
Get the knowledgeSources property: The knowledgeSources property.- Returns:
- the knowledgeSources value.
-
getModels
Get the models property: Contains configuration options on how to connect to AI models.- Returns:
- the models value.
-
setModels
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
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
Get the outputMode property: The output configuration for this retrieval.- Returns:
- the outputMode value.
-
setOutputMode
Set the outputMode property: The output configuration for this retrieval.- Parameters:
outputMode- the outputMode value to set.- Returns:
- the KnowledgeBase object itself.
-
getETag
Get the eTag property: The ETag of the knowledge base.- Returns:
- the eTag value.
-
setETag
Set the eTag property: The ETag of the knowledge base.- Parameters:
eTag- the eTag value to set.- Returns:
- the KnowledgeBase object itself.
-
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
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
Get the description property: The description of the knowledge base.- Returns:
- the description value.
-
setDescription
Set the description property: The description of the knowledge base.- Parameters:
description- the description value to set.- Returns:
- the KnowledgeBase object itself.
-
getRetrievalInstructions
Get the retrievalInstructions property: Instructions considered by the knowledge knowledge base when developing query plan.- Returns:
- the retrievalInstructions value.
-
setRetrievalInstructions
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
Get the answerInstructions property: Instructions considered by the knowledge knowledge base when generating answers.- Returns:
- the answerInstructions value.
-
setAnswerInstructions
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<KnowledgeBase>- Throws:
IOException
-
fromJson
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.
-