Class LLMChoiceStreaming
java.lang.Object
com.sap.ai.sdk.orchestration.model.LLMChoiceStreaming
LLMChoiceStreaming
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for LLMChoiceStreaming. -
Method Summary
Modifier and TypeMethodDescriptionstatic LLMChoiceStreaming.Buildercreate()Create a type-safe, fluent-api builder object to construct a newLLMChoiceStreaminginstance with all required arguments.Set the delta of thisLLMChoiceStreaminginstance and return the same instance.booleanfinishReason(String finishReason) Set the finishReason of thisLLMChoiceStreaminginstance and return the same instance.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theLLMChoiceStreaming.getDelta()Get deltaReason for stopping the modelgetIndex()Index of the choiceGet logprobsProvider-specific fields not representable in the OpenAI schema.inthashCode()Set the index of thisLLMChoiceStreaminginstance and return the same instance.logprobs(ChoiceLogprobs logprobs) Set the logprobs of thisLLMChoiceStreaminginstance and return the same instance.providerSpecificFields(Map<String, Object> providerSpecificFields) Set the providerSpecificFields of thisLLMChoiceStreaminginstance and return the same instance.putproviderSpecificFieldsItem(String key, Object providerSpecificFieldsItem) Put one providerSpecificFields instance to thisLLMChoiceStreaminginstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisLLMChoiceStreaminginstance.voidSet the delta of thisLLMChoiceStreaminginstance.voidsetFinishReason(String finishReason) Set the finishReason of thisLLMChoiceStreaminginstance.voidSet the index of thisLLMChoiceStreaminginstance.voidsetLogprobs(ChoiceLogprobs logprobs) Set the logprobs of thisLLMChoiceStreaminginstance.voidsetProviderSpecificFields(Map<String, Object> providerSpecificFields) Set the providerSpecificFields of thisLLMChoiceStreaminginstance.toMap()Get the value of all properties of thisLLMChoiceStreaminginstance including unrecognized properties.toString()
-
Constructor Details
-
LLMChoiceStreaming
protected LLMChoiceStreaming()Default constructor for LLMChoiceStreaming.
-
-
Method Details
-
index
Set the index of thisLLMChoiceStreaminginstance and return the same instance.- Parameters:
index- Index of the choice- Returns:
- The same instance of this
LLMChoiceStreamingclass
-
getIndex
Index of the choice- Returns:
- index The index of this
LLMChoiceStreaminginstance.
-
setIndex
Set the index of thisLLMChoiceStreaminginstance.- Parameters:
index- Index of the choice
-
delta
Set the delta of thisLLMChoiceStreaminginstance and return the same instance.- Parameters:
delta- The delta of thisLLMChoiceStreaming- Returns:
- The same instance of this
LLMChoiceStreamingclass
-
getDelta
Get delta- Returns:
- delta The delta of this
LLMChoiceStreaminginstance.
-
setDelta
Set the delta of thisLLMChoiceStreaminginstance.- Parameters:
delta- The delta of thisLLMChoiceStreaming
-
logprobs
Set the logprobs of thisLLMChoiceStreaminginstance and return the same instance.- Parameters:
logprobs- The logprobs of thisLLMChoiceStreaming- Returns:
- The same instance of this
LLMChoiceStreamingclass
-
getLogprobs
Get logprobs- Returns:
- logprobs The logprobs of this
LLMChoiceStreaminginstance.
-
setLogprobs
Set the logprobs of thisLLMChoiceStreaminginstance.- Parameters:
logprobs- The logprobs of thisLLMChoiceStreaming
-
finishReason
Set the finishReason of thisLLMChoiceStreaminginstance and return the same instance.- Parameters:
finishReason- Reason for stopping the model- Returns:
- The same instance of this
LLMChoiceStreamingclass
-
getFinishReason
Reason for stopping the model- Returns:
- finishReason The finishReason of this
LLMChoiceStreaminginstance.
-
setFinishReason
Set the finishReason of thisLLMChoiceStreaminginstance.- Parameters:
finishReason- Reason for stopping the model
-
providerSpecificFields
@Nonnull public LLMChoiceStreaming providerSpecificFields(@Nullable Map<String, Object> providerSpecificFields) Set the providerSpecificFields of thisLLMChoiceStreaminginstance and return the same instance.- Parameters:
providerSpecificFields- Provider-specific fields not representable in the OpenAI schema. When not identical, includes 'finish_reason' with the raw, unmapped finish reason string from the provider.- Returns:
- The same instance of this
LLMChoiceStreamingclass
-
putproviderSpecificFieldsItem
@Nonnull public LLMChoiceStreaming putproviderSpecificFieldsItem(@Nonnull String key, @Nullable Object providerSpecificFieldsItem) Put one providerSpecificFields instance to thisLLMChoiceStreaminginstance.- Parameters:
key- The String key of this providerSpecificFields instanceproviderSpecificFieldsItem- The providerSpecificFields that should be added under the given key- Returns:
- The same instance of type
LLMChoiceStreaming
-
getProviderSpecificFields
Provider-specific fields not representable in the OpenAI schema. When not identical, includes 'finish_reason' with the raw, unmapped finish reason string from the provider.- Returns:
- providerSpecificFields The providerSpecificFields of this
LLMChoiceStreaminginstance.
-
setProviderSpecificFields
Set the providerSpecificFields of thisLLMChoiceStreaminginstance.- Parameters:
providerSpecificFields- Provider-specific fields not representable in the OpenAI schema. When not identical, includes 'finish_reason' with the raw, unmapped finish reason string from the provider.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theLLMChoiceStreaming.- 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 thisLLMChoiceStreaminginstance.- 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 thisLLMChoiceStreaminginstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisLLMChoiceStreaminginstance. 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 newLLMChoiceStreaminginstance with all required arguments.
-
toMap()instead.