Class KnowledgeBaseModelAnswerSynthesisActivityRecord
java.lang.Object
com.azure.search.documents.knowledgebases.models.KnowledgeBaseActivityRecord
com.azure.search.documents.knowledgebases.models.KnowledgeBaseModelAnswerSynthesisActivityRecord
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KnowledgeBaseActivityRecord>
public final class KnowledgeBaseModelAnswerSynthesisActivityRecord
extends KnowledgeBaseActivityRecord
Represents an LLM answer synthesis activity record.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of KnowledgeBaseModelAnswerSynthesisActivityRecord class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of KnowledgeBaseModelAnswerSynthesisActivityRecord from the JsonReader.Get the inputTokens property: The number of input tokens for the LLM answer synthesis activity.Get the outputTokens property: The number of output tokens for the LLM answer synthesis activity.getType()Get the type property: The type of the activity record.setElapsedMs(Integer elapsedMs) Set the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.setError(KnowledgeBaseErrorDetail error) Set the error property: The error detail explaining why the operation failed.setInputTokens(Integer inputTokens) Set the inputTokens property: The number of input tokens for the LLM answer synthesis activity.setOutputTokens(Integer outputTokens) Set the outputTokens property: The number of output tokens for the LLM answer synthesis activity.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class KnowledgeBaseActivityRecord
getElapsedMs, getError, getIdMethods 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
-
KnowledgeBaseModelAnswerSynthesisActivityRecord
public KnowledgeBaseModelAnswerSynthesisActivityRecord(int id) Creates an instance of KnowledgeBaseModelAnswerSynthesisActivityRecord class.- Parameters:
id- the id value to set.
-
-
Method Details
-
getType
Get the type property: The type of the activity record.- Overrides:
getTypein classKnowledgeBaseActivityRecord- Returns:
- the type value.
-
getInputTokens
Get the inputTokens property: The number of input tokens for the LLM answer synthesis activity.- Returns:
- the inputTokens value.
-
setInputTokens
Set the inputTokens property: The number of input tokens for the LLM answer synthesis activity.- Parameters:
inputTokens- the inputTokens value to set.- Returns:
- the KnowledgeBaseModelAnswerSynthesisActivityRecord object itself.
-
getOutputTokens
Get the outputTokens property: The number of output tokens for the LLM answer synthesis activity.- Returns:
- the outputTokens value.
-
setOutputTokens
Set the outputTokens property: The number of output tokens for the LLM answer synthesis activity.- Parameters:
outputTokens- the outputTokens value to set.- Returns:
- the KnowledgeBaseModelAnswerSynthesisActivityRecord object itself.
-
setElapsedMs
Set the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.- Overrides:
setElapsedMsin classKnowledgeBaseActivityRecord- Parameters:
elapsedMs- the elapsedMs value to set.- Returns:
- the KnowledgeBaseActivityRecord object itself.
-
setError
Set the error property: The error detail explaining why the operation failed. This property is only included when the activity does not succeed.- Overrides:
setErrorin classKnowledgeBaseActivityRecord- Parameters:
error- the error value to set.- Returns:
- the KnowledgeBaseActivityRecord object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<KnowledgeBaseActivityRecord>- Overrides:
toJsonin classKnowledgeBaseActivityRecord- Throws:
IOException
-
fromJson
public static KnowledgeBaseModelAnswerSynthesisActivityRecord fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of KnowledgeBaseModelAnswerSynthesisActivityRecord from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of KnowledgeBaseModelAnswerSynthesisActivityRecord 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 KnowledgeBaseModelAnswerSynthesisActivityRecord.
-