KnowledgeBaseRetrievalOptions Class

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

Implements

public final class KnowledgeBaseRetrievalOptions
implements JsonSerializable<KnowledgeBaseRetrievalOptions>

The input contract for the retrieval request.

Constructor Summary

Constructor Description
KnowledgeBaseRetrievalOptions()

Creates an instance of KnowledgeBaseRetrievalOptions class.

Method Summary

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

Reads an instance of KnowledgeBaseRetrievalOptions from the JsonReader.

List<KnowledgeRetrievalIntent> getIntents()

Get the intents property: A list of intended queries to execute without model query planning.

List<KnowledgeSourceParams> getKnowledgeSourceParams()

Get the knowledgeSourceParams property: A list of runtime parameters for the knowledge sources.

Integer getMaxOutputSizeInTokens()

Get the maxOutputSizeInTokens property: Limits the maximum size of the content in the output.

Integer getMaxRuntimeInSeconds()

Get the maxRuntimeInSeconds property: The maximum runtime in seconds.

Boolean isIncludeActivity()

Get the includeActivity property: Indicates retrieval results should include activity information.

KnowledgeBaseRetrievalOptions setIncludeActivity(Boolean includeActivity)

Set the includeActivity property: Indicates retrieval results should include activity information.

KnowledgeBaseRetrievalOptions setIntents(KnowledgeRetrievalIntent[] intents)

Set the intents property: A list of intended queries to execute without model query planning.

KnowledgeBaseRetrievalOptions setIntents(List<KnowledgeRetrievalIntent> intents)

Set the intents property: A list of intended queries to execute without model query planning.

KnowledgeBaseRetrievalOptions setKnowledgeSourceParams(List<KnowledgeSourceParams> knowledgeSourceParams)

Set the knowledgeSourceParams property: A list of runtime parameters for the knowledge sources.

KnowledgeBaseRetrievalOptions setMaxOutputSizeInTokens(Integer maxOutputSizeInTokens)

Set the maxOutputSizeInTokens property: Limits the maximum size of the content in the output.

KnowledgeBaseRetrievalOptions setMaxRuntimeInSeconds(Integer maxRuntimeInSeconds)

Set the maxRuntimeInSeconds property: The maximum runtime in seconds.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

KnowledgeBaseRetrievalOptions

public KnowledgeBaseRetrievalOptions()

Creates an instance of KnowledgeBaseRetrievalOptions class.

Method Details

fromJson

public static KnowledgeBaseRetrievalOptions fromJson(JsonReader jsonReader)

Reads an instance of KnowledgeBaseRetrievalOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KnowledgeBaseRetrievalOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the KnowledgeBaseRetrievalOptions.

getIntents

public List<KnowledgeRetrievalIntent> getIntents()

Get the intents property: A list of intended queries to execute without model query planning.

Returns:

the intents value.

getKnowledgeSourceParams

public List<KnowledgeSourceParams> getKnowledgeSourceParams()

Get the knowledgeSourceParams property: A list of runtime parameters for the knowledge sources.

Returns:

the knowledgeSourceParams value.

getMaxOutputSizeInTokens

public Integer getMaxOutputSizeInTokens()

Get the maxOutputSizeInTokens property: Limits the maximum size of the content in the output.

Returns:

the maxOutputSizeInTokens value.

getMaxRuntimeInSeconds

public Integer getMaxRuntimeInSeconds()

Get the maxRuntimeInSeconds property: The maximum runtime in seconds.

Returns:

the maxRuntimeInSeconds value.

isIncludeActivity

public Boolean isIncludeActivity()

Get the includeActivity property: Indicates retrieval results should include activity information.

Returns:

the includeActivity value.

setIncludeActivity

public KnowledgeBaseRetrievalOptions setIncludeActivity(Boolean includeActivity)

Set the includeActivity property: Indicates retrieval results should include activity information.

Parameters:

includeActivity - the includeActivity value to set.

Returns:

the KnowledgeBaseRetrievalOptions object itself.

setIntents

public KnowledgeBaseRetrievalOptions setIntents(KnowledgeRetrievalIntent[] intents)

Set the intents property: A list of intended queries to execute without model query planning.

Parameters:

intents - the intents value to set.

Returns:

the KnowledgeBaseRetrievalOptions object itself.

setIntents

public KnowledgeBaseRetrievalOptions setIntents(List<KnowledgeRetrievalIntent> intents)

Set the intents property: A list of intended queries to execute without model query planning.

Parameters:

intents - the intents value to set.

Returns:

the KnowledgeBaseRetrievalOptions object itself.

setKnowledgeSourceParams

public KnowledgeBaseRetrievalOptions setKnowledgeSourceParams(List<KnowledgeSourceParams> knowledgeSourceParams)

Set the knowledgeSourceParams property: A list of runtime parameters for the knowledge sources.

Parameters:

knowledgeSourceParams - the knowledgeSourceParams value to set.

Returns:

the KnowledgeBaseRetrievalOptions object itself.

setMaxOutputSizeInTokens

public KnowledgeBaseRetrievalOptions setMaxOutputSizeInTokens(Integer maxOutputSizeInTokens)

Set the maxOutputSizeInTokens property: Limits the maximum size of the content in the output.

Parameters:

maxOutputSizeInTokens - the maxOutputSizeInTokens value to set.

Returns:

the KnowledgeBaseRetrievalOptions object itself.

setMaxRuntimeInSeconds

public KnowledgeBaseRetrievalOptions setMaxRuntimeInSeconds(Integer maxRuntimeInSeconds)

Set the maxRuntimeInSeconds property: The maximum runtime in seconds.

Parameters:

maxRuntimeInSeconds - the maxRuntimeInSeconds value to set.

Returns:

the KnowledgeBaseRetrievalOptions object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to