KnowledgeBase Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.KnowledgeBase

Implements

public final class KnowledgeBase
implements JsonSerializable<KnowledgeBase>

Represents a knowledge base definition.

Constructor Summary

Constructor Description
KnowledgeBase(String name, KnowledgeSourceReference[] knowledgeSources)

Creates an instance of KnowledgeBase class.

KnowledgeBase(String name, List<KnowledgeSourceReference> knowledgeSources)

Creates an instance of KnowledgeBase class.

Method Summary

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

Reads an instance of KnowledgeBase from the JsonReader.

String getAnswerInstructions()

Get the answerInstructions property: Instructions considered by the knowledge base when generating answers.

CorsOptions getCorsOptions()

Get the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the knowledge base.

String getDescription()

Get the description property: The description of the knowledge base.

SearchResourceEncryptionKey getEncryptionKey()

Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

String getETag()

Get the eTag property: The ETag of the knowledge base.

List<KnowledgeSourceReference> getKnowledgeSources()

Get the knowledgeSources property: Knowledge sources referenced by this knowledge base.

List<KnowledgeBaseModel> getModels()

Get the models property: Contains configuration options on how to connect to AI models.

String getName()

Get the name property: The name of the knowledge base.

KnowledgeRetrievalOutputMode getOutputMode()

Get the outputMode property: The output mode for the knowledge base.

String getRetrievalInstructions()

Get the retrievalInstructions property: Instructions considered by the knowledge base when developing query plan.

KnowledgeRetrievalReasoningEffort getRetrievalReasoningEffort()

Get the retrievalReasoningEffort property: The retrieval reasoning effort configuration.

KnowledgeBase setAnswerInstructions(String answerInstructions)

Set the answerInstructions property: Instructions considered by the knowledge base when generating answers.

KnowledgeBase setCorsOptions(CorsOptions corsOptions)

Set the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the knowledge base.

KnowledgeBase setDescription(String description)

Set the description property: The description of the knowledge base.

KnowledgeBase setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

KnowledgeBase setETag(String eTag)

Set the eTag property: The ETag of the knowledge base.

KnowledgeBase setModels(KnowledgeBaseModel[] models)

Set the models property: Contains configuration options on how to connect to AI models.

KnowledgeBase setModels(List<KnowledgeBaseModel> models)

Set the models property: Contains configuration options on how to connect to AI models.

KnowledgeBase setOutputMode(KnowledgeRetrievalOutputMode outputMode)

Set the outputMode property: The output mode for the knowledge base.

KnowledgeBase setRetrievalInstructions(String retrievalInstructions)

Set the retrievalInstructions property: Instructions considered by the knowledge base when developing query plan.

KnowledgeBase setRetrievalReasoningEffort(KnowledgeRetrievalReasoningEffort retrievalReasoningEffort)

Set the retrievalReasoningEffort property: The retrieval reasoning effort configuration.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

KnowledgeBase

public KnowledgeBase(String name, KnowledgeSourceReference[] knowledgeSources)

Creates an instance of KnowledgeBase class.

Parameters:

name - the name value to set.
knowledgeSources - the knowledgeSources value to set.

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

fromJson

public static KnowledgeBase fromJson(JsonReader jsonReader)

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:

IOException

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

getAnswerInstructions

public String getAnswerInstructions()

Get the answerInstructions property: Instructions considered by the knowledge base when generating answers.

Returns:

the answerInstructions value.

getCorsOptions

public CorsOptions getCorsOptions()

Get the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the knowledge base.

Returns:

the corsOptions value.

getDescription

public String getDescription()

Get the description property: The description of the knowledge base.

Returns:

the description value.

getEncryptionKey

public SearchResourceEncryptionKey getEncryptionKey()

Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

Returns:

the encryptionKey value.

getETag

public String getETag()

Get the eTag property: The ETag of the knowledge base.

Returns:

the eTag value.

getKnowledgeSources

public List<KnowledgeSourceReference> getKnowledgeSources()

Get the knowledgeSources property: Knowledge sources referenced by this knowledge base.

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.

getName

public String getName()

Get the name property: The name of the knowledge base.

Returns:

the name value.

getOutputMode

public KnowledgeRetrievalOutputMode getOutputMode()

Get the outputMode property: The output mode for the knowledge base.

Returns:

the outputMode value.

getRetrievalInstructions

public String getRetrievalInstructions()

Get the retrievalInstructions property: Instructions considered by the knowledge base when developing query plan.

Returns:

the retrievalInstructions value.

getRetrievalReasoningEffort

public KnowledgeRetrievalReasoningEffort getRetrievalReasoningEffort()

Get the retrievalReasoningEffort property: The retrieval reasoning effort configuration.

Returns:

the retrievalReasoningEffort value.

setAnswerInstructions

public KnowledgeBase setAnswerInstructions(String answerInstructions)

Set the answerInstructions property: Instructions considered by the knowledge base when generating answers.

Parameters:

answerInstructions - the answerInstructions value to set.

Returns:

the KnowledgeBase object itself.

setCorsOptions

public KnowledgeBase setCorsOptions(CorsOptions corsOptions)

Set the corsOptions property: Options to control Cross-Origin Resource Sharing (CORS) for the knowledge base.

Parameters:

corsOptions - the corsOptions value to set.

Returns:

the KnowledgeBase object itself.

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.

setEncryptionKey

public KnowledgeBase setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

Parameters:

encryptionKey - the encryptionKey value to set.

Returns:

the KnowledgeBase object itself.

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.

setModels

public KnowledgeBase setModels(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.

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.

setOutputMode

public KnowledgeBase setOutputMode(KnowledgeRetrievalOutputMode outputMode)

Set the outputMode property: The output mode for the knowledge base.

Parameters:

outputMode - the outputMode value to set.

Returns:

the KnowledgeBase object itself.

setRetrievalInstructions

public KnowledgeBase setRetrievalInstructions(String retrievalInstructions)

Set the retrievalInstructions property: Instructions considered by the knowledge base when developing query plan.

Parameters:

retrievalInstructions - the retrievalInstructions value to set.

Returns:

the KnowledgeBase object itself.

setRetrievalReasoningEffort

public KnowledgeBase setRetrievalReasoningEffort(KnowledgeRetrievalReasoningEffort retrievalReasoningEffort)

Set the retrievalReasoningEffort property: The retrieval reasoning effort configuration.

Parameters:

retrievalReasoningEffort - the retrievalReasoningEffort value to set.

Returns:

the KnowledgeBase object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to