KnowledgeSourceParams Class

  • java.lang.Object
    • com.azure.search.documents.knowledgebases.models.KnowledgeSourceParams

Implements

public class KnowledgeSourceParams
implements JsonSerializable<KnowledgeSourceParams>

Base type for knowledge source runtime parameters.

Constructor Summary

Constructor Description
KnowledgeSourceParams(String knowledgeSourceName)

Creates an instance of KnowledgeSourceParams class.

Method Summary

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

Reads an instance of KnowledgeSourceParams from the JsonReader.

KnowledgeSourceKind getKind()

Get the kind property: The type of the knowledge source.

String getKnowledgeSourceName()

Get the knowledgeSourceName property: The name of the index the params apply to.

Integer getMaxOutputDocuments()

Get the maxOutputDocuments property: Limits the maximum number of documents returned from this knowledge source.

Float getRerankerThreshold()

Get the rerankerThreshold property: The reranker threshold all retrieved documents must meet to be included in the response.

Boolean isAlwaysQuerySource()

Get the alwaysQuerySource property: Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

Boolean isEnableImageServing()

Get the enableImageServing property: Indicates whether image serving should be enabled for this knowledge source at retrieval time.

Boolean isFailOnError()

Get the failOnError property: Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error.

Boolean isIncludeReferences()

Get the includeReferences property: Indicates whether references should be included for data retrieved from this source.

Boolean isIncludeReferenceSourceData()

Get the includeReferenceSourceData property: Indicates whether references should include the structured data obtained during retrieval in their payload.

KnowledgeSourceParams setAlwaysQuerySource(Boolean alwaysQuerySource)

Set the alwaysQuerySource property: Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

KnowledgeSourceParams setEnableImageServing(Boolean enableImageServing)

Set the enableImageServing property: Indicates whether image serving should be enabled for this knowledge source at retrieval time.

KnowledgeSourceParams setFailOnError(Boolean failOnError)

Set the failOnError property: Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error.

KnowledgeSourceParams setIncludeReferences(Boolean includeReferences)

Set the includeReferences property: Indicates whether references should be included for data retrieved from this source.

KnowledgeSourceParams setIncludeReferenceSourceData(Boolean includeReferenceSourceData)

Set the includeReferenceSourceData property: Indicates whether references should include the structured data obtained during retrieval in their payload.

KnowledgeSourceParams setMaxOutputDocuments(Integer maxOutputDocuments)

Set the maxOutputDocuments property: Limits the maximum number of documents returned from this knowledge source.

KnowledgeSourceParams setRerankerThreshold(Float rerankerThreshold)

Set the rerankerThreshold property: The reranker threshold all retrieved documents must meet to be included in the response.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

KnowledgeSourceParams

public KnowledgeSourceParams(String knowledgeSourceName)

Creates an instance of KnowledgeSourceParams class.

Parameters:

knowledgeSourceName - the knowledgeSourceName value to set.

Method Details

fromJson

public static KnowledgeSourceParams fromJson(JsonReader jsonReader)

Reads an instance of KnowledgeSourceParams from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KnowledgeSourceParams 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.

getKind

public KnowledgeSourceKind getKind()

Get the kind property: The type of the knowledge source.

Returns:

the kind value.

getKnowledgeSourceName

public String getKnowledgeSourceName()

Get the knowledgeSourceName property: The name of the index the params apply to.

Returns:

the knowledgeSourceName value.

getMaxOutputDocuments

public Integer getMaxOutputDocuments()

Get the maxOutputDocuments property: Limits the maximum number of documents returned from this knowledge source.

Returns:

the maxOutputDocuments value.

getRerankerThreshold

public Float getRerankerThreshold()

Get the rerankerThreshold property: The reranker threshold all retrieved documents must meet to be included in the response.

Returns:

the rerankerThreshold value.

isAlwaysQuerySource

public Boolean isAlwaysQuerySource()

Get the alwaysQuerySource property: Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

Returns:

the alwaysQuerySource value.

isEnableImageServing

public Boolean isEnableImageServing()

Get the enableImageServing property: Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

Returns:

the enableImageServing value.

isFailOnError

public Boolean isFailOnError()

Get the failOnError property: Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

Returns:

the failOnError value.

isIncludeReferences

public Boolean isIncludeReferences()

Get the includeReferences property: Indicates whether references should be included for data retrieved from this source.

Returns:

the includeReferences value.

isIncludeReferenceSourceData

public Boolean isIncludeReferenceSourceData()

Get the includeReferenceSourceData property: Indicates whether references should include the structured data obtained during retrieval in their payload.

Returns:

the includeReferenceSourceData value.

setAlwaysQuerySource

public KnowledgeSourceParams setAlwaysQuerySource(Boolean alwaysQuerySource)

Set the alwaysQuerySource property: Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

Parameters:

alwaysQuerySource - the alwaysQuerySource value to set.

Returns:

the KnowledgeSourceParams object itself.

setEnableImageServing

public KnowledgeSourceParams setEnableImageServing(Boolean enableImageServing)

Set the enableImageServing property: Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

Parameters:

enableImageServing - the enableImageServing value to set.

Returns:

the KnowledgeSourceParams object itself.

setFailOnError

public KnowledgeSourceParams setFailOnError(Boolean failOnError)

Set the failOnError property: Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

Parameters:

failOnError - the failOnError value to set.

Returns:

the KnowledgeSourceParams object itself.

setIncludeReferences

public KnowledgeSourceParams setIncludeReferences(Boolean includeReferences)

Set the includeReferences property: Indicates whether references should be included for data retrieved from this source.

Parameters:

includeReferences - the includeReferences value to set.

Returns:

the KnowledgeSourceParams object itself.

setIncludeReferenceSourceData

public KnowledgeSourceParams setIncludeReferenceSourceData(Boolean includeReferenceSourceData)

Set the includeReferenceSourceData property: Indicates whether references should include the structured data obtained during retrieval in their payload.

Parameters:

includeReferenceSourceData - the includeReferenceSourceData value to set.

Returns:

the KnowledgeSourceParams object itself.

setMaxOutputDocuments

public KnowledgeSourceParams setMaxOutputDocuments(Integer maxOutputDocuments)

Set the maxOutputDocuments property: Limits the maximum number of documents returned from this knowledge source.

Parameters:

maxOutputDocuments - the maxOutputDocuments value to set.

Returns:

the KnowledgeSourceParams object itself.

setRerankerThreshold

public KnowledgeSourceParams setRerankerThreshold(Float rerankerThreshold)

Set the rerankerThreshold property: The reranker threshold all retrieved documents must meet to be included in the response.

Parameters:

rerankerThreshold - the rerankerThreshold value to set.

Returns:

the KnowledgeSourceParams object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to