Class LLMModuleResult
java.lang.Object
com.sap.ai.sdk.orchestration.model.LLMModuleResult
Output from LLM. Follows the OpenAI spec.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class.static interfaceBuilder helper class.static interfaceBuilder helper class.static interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for LLMModuleResult. -
Method Summary
Modifier and TypeMethodDescriptionSet the _object of thisLLMModuleResultinstance and return the same instance.addChoicesItem(LLMChoice choicesItem) Add one choices instance to thisLLMModuleResult.addCitationsItem(Citation citationsItem) Add one citations instance to thisLLMModuleResult.Set the choices of thisLLMModuleResultinstance and return the same instance.Set the citations of thisLLMModuleResultinstance and return the same instance.static LLMModuleResult.Buildercreate()Create a type-safe, fluent-api builder object to construct a newLLMModuleResultinstance with all required arguments.Set the created of thisLLMModuleResultinstance and return the same instance.booleanChoicesList of citations associated with the response.Unix timestampgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theLLMModuleResult.getId()ID of the responsegetModel()Model nameObject typeSystem fingerprintgetUsage()Get usageinthashCode()Set the id of thisLLMModuleResultinstance and return the same instance.Set the model of thisLLMModuleResultinstance and return the same instance.voidsetChoices(List<LLMChoice> choices) Set the choices of thisLLMModuleResultinstance.voidsetCitations(List<Citation> citations) Set the citations of thisLLMModuleResultinstance.voidsetCreated(Integer created) Set the created of thisLLMModuleResultinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisLLMModuleResultinstance.voidSet the id of thisLLMModuleResultinstance.voidSet the model of thisLLMModuleResultinstance.voidSet the _object of thisLLMModuleResultinstance.voidsetSystemFingerprint(String systemFingerprint) Set the systemFingerprint of thisLLMModuleResultinstance.voidsetUsage(TokenUsage usage) Set the usage of thisLLMModuleResultinstance.systemFingerprint(String systemFingerprint) Set the systemFingerprint of thisLLMModuleResultinstance and return the same instance.toMap()Get the value of all properties of thisLLMModuleResultinstance including unrecognized properties.toString()usage(TokenUsage usage) Set the usage of thisLLMModuleResultinstance and return the same instance.
-
Constructor Details
-
LLMModuleResult
protected LLMModuleResult()Default constructor for LLMModuleResult.
-
-
Method Details
-
id
Set the id of thisLLMModuleResultinstance and return the same instance.- Parameters:
id- ID of the response- Returns:
- The same instance of this
LLMModuleResultclass
-
getId
ID of the response- Returns:
- id The id of this
LLMModuleResultinstance.
-
setId
Set the id of thisLLMModuleResultinstance.- Parameters:
id- ID of the response
-
_object
Set the _object of thisLLMModuleResultinstance and return the same instance.- Parameters:
_object- Object type- Returns:
- The same instance of this
LLMModuleResultclass
-
getObject
Object type- Returns:
- _object The _object of this
LLMModuleResultinstance.
-
setObject
Set the _object of thisLLMModuleResultinstance.- Parameters:
_object- Object type
-
created
Set the created of thisLLMModuleResultinstance and return the same instance.- Parameters:
created- Unix timestamp- Returns:
- The same instance of this
LLMModuleResultclass
-
getCreated
Unix timestamp- Returns:
- created The created of this
LLMModuleResultinstance.
-
setCreated
Set the created of thisLLMModuleResultinstance.- Parameters:
created- Unix timestamp
-
model
Set the model of thisLLMModuleResultinstance and return the same instance.- Parameters:
model- Model name- Returns:
- The same instance of this
LLMModuleResultclass
-
getModel
Model name- Returns:
- model The model of this
LLMModuleResultinstance.
-
setModel
Set the model of thisLLMModuleResultinstance.- Parameters:
model- Model name
-
systemFingerprint
Set the systemFingerprint of thisLLMModuleResultinstance and return the same instance.- Parameters:
systemFingerprint- System fingerprint- Returns:
- The same instance of this
LLMModuleResultclass
-
getSystemFingerprint
System fingerprint- Returns:
- systemFingerprint The systemFingerprint of this
LLMModuleResultinstance.
-
setSystemFingerprint
Set the systemFingerprint of thisLLMModuleResultinstance.- Parameters:
systemFingerprint- System fingerprint
-
choices
Set the choices of thisLLMModuleResultinstance and return the same instance.- Parameters:
choices- Choices- Returns:
- The same instance of this
LLMModuleResultclass
-
addChoicesItem
Add one choices instance to thisLLMModuleResult.- Parameters:
choicesItem- The choices that should be added- Returns:
- The same instance of type
LLMModuleResult
-
getChoices
Choices- Returns:
- choices The choices of this
LLMModuleResultinstance.
-
setChoices
Set the choices of thisLLMModuleResultinstance.- Parameters:
choices- Choices
-
usage
Set the usage of thisLLMModuleResultinstance and return the same instance.- Parameters:
usage- The usage of thisLLMModuleResult- Returns:
- The same instance of this
LLMModuleResultclass
-
getUsage
Get usage- Returns:
- usage The usage of this
LLMModuleResultinstance.
-
setUsage
Set the usage of thisLLMModuleResultinstance.- Parameters:
usage- The usage of thisLLMModuleResult
-
citations
Set the citations of thisLLMModuleResultinstance and return the same instance.- Parameters:
citations- List of citations associated with the response.- Returns:
- The same instance of this
LLMModuleResultclass
-
addCitationsItem
Add one citations instance to thisLLMModuleResult.- Parameters:
citationsItem- The citations that should be added- Returns:
- The same instance of type
LLMModuleResult
-
getCitations
List of citations associated with the response.- Returns:
- citations The citations of this
LLMModuleResultinstance.
-
setCitations
Set the citations of thisLLMModuleResultinstance.- Parameters:
citations- List of citations associated with the response.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theLLMModuleResult.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisLLMModuleResultinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisLLMModuleResultinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisLLMModuleResultinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newLLMModuleResultinstance with all required arguments.
-
toMap()instead.