Package com.sap.ai.sdk.orchestration.model

# Class LLMChoiceStreaming

java.lang.Object
com.sap.ai.sdk.orchestration.model.LLMChoiceStreaming

public class LLMChoiceStreaming extends Object
LLMChoiceStreaming

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `LLMChoiceStreaming.Builder`
  Builder helper class.
  `static interface`
  `LLMChoiceStreaming.Builder1`
  Builder helper class.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `LLMChoiceStreaming()`
  Default constructor for LLMChoiceStreaming.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static LLMChoiceStreaming.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `LLMChoiceStreaming` instance with all required arguments.
  `LLMChoiceStreaming`
  `delta(ChatDelta delta)`
  Set the delta of this `LLMChoiceStreaming` instance and return the same instance.
  `boolean`
  `equals(Object o)`
  `LLMChoiceStreaming`
  `finishReason(String finishReason)`
  Set the finishReason of this `LLMChoiceStreaming` instance and return the same instance.
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `LLMChoiceStreaming`.
  `ChatDelta`
  `getDelta()`
  Get delta
  `String`
  `getFinishReason()`
  Reason for stopping the model
  `Integer`
  `getIndex()`
  Index of the choice
  `ChoiceLogprobs`
  `getLogprobs()`
  Get logprobs
  `int`
  `hashCode()`
  `LLMChoiceStreaming`
  `index(Integer index)`
  Set the index of this `LLMChoiceStreaming` instance and return the same instance.
  `LLMChoiceStreaming`
  `logprobs(ChoiceLogprobs logprobs)`
  Set the logprobs of this `LLMChoiceStreaming` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `LLMChoiceStreaming` instance.
  `void`
  `setDelta(ChatDelta delta)`
  Set the delta of this `LLMChoiceStreaming` instance.
  `void`
  `setFinishReason(String finishReason)`
  Set the finishReason of this `LLMChoiceStreaming` instance.
  `void`
  `setIndex(Integer index)`
  Set the index of this `LLMChoiceStreaming` instance.
  `void`
  `setLogprobs(ChoiceLogprobs logprobs)`
  Set the logprobs of this `LLMChoiceStreaming` instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `LLMChoiceStreaming` instance including unrecognized properties.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### LLMChoiceStreaming

    protected LLMChoiceStreaming()
    Default constructor for LLMChoiceStreaming.

- ## Method Details

  - ### index

    @Nonnull public LLMChoiceStreaming index(@Nonnull Integer index)
    Set the index of this `LLMChoiceStreaming` instance and return the same instance.
    Parameters:
      `index` - Index of the choice
    Returns:
      The same instance of this `LLMChoiceStreaming` class

  - ### getIndex

    @Nonnull public Integer getIndex()
    Index of the choice
    Returns:
      index The index of this `LLMChoiceStreaming` instance.

  - ### setIndex

    public void setIndex(@Nonnull Integer index)
    Set the index of this `LLMChoiceStreaming` instance.
    Parameters:
      `index` - Index of the choice

  - ### delta

    @Nonnull public LLMChoiceStreaming delta(@Nonnull ChatDelta delta)
    Set the delta of this `LLMChoiceStreaming` instance and return the same instance.
    Parameters:
      `delta` - The delta of this `LLMChoiceStreaming`
    Returns:
      The same instance of this `LLMChoiceStreaming` class

  - ### getDelta

    @Nonnull public ChatDelta getDelta()
    Get delta
    Returns:
      delta The delta of this `LLMChoiceStreaming` instance.

  - ### setDelta

    public void setDelta(@Nonnull ChatDelta delta)
    Set the delta of this `LLMChoiceStreaming` instance.
    Parameters:
      `delta` - The delta of this `LLMChoiceStreaming`

  - ### logprobs

    @Nonnull public LLMChoiceStreaming logprobs(@Nullable ChoiceLogprobs logprobs)
    Set the logprobs of this `LLMChoiceStreaming` instance and return the same instance.
    Parameters:
      `logprobs` - The logprobs of this `LLMChoiceStreaming`
    Returns:
      The same instance of this `LLMChoiceStreaming` class

  - ### getLogprobs

    @Nonnull public ChoiceLogprobs getLogprobs()
    Get logprobs
    Returns:
      logprobs The logprobs of this `LLMChoiceStreaming` instance.

  - ### setLogprobs

    public void setLogprobs(@Nullable ChoiceLogprobs logprobs)
    Set the logprobs of this `LLMChoiceStreaming` instance.
    Parameters:
      `logprobs` - The logprobs of this `LLMChoiceStreaming`

  - ### finishReason

    @Nonnull public LLMChoiceStreaming finishReason(@Nullable String finishReason)
    Set the finishReason of this `LLMChoiceStreaming` instance and return the same instance.
    Parameters:
      `finishReason` - Reason for stopping the model
    Returns:
      The same instance of this `LLMChoiceStreaming` class

  - ### getFinishReason

    @Nonnull public String getFinishReason()
    Reason for stopping the model
    Returns:
      finishReason The finishReason of this `LLMChoiceStreaming` instance.

  - ### setFinishReason

    public void setFinishReason(@Nullable String finishReason)
    Set the finishReason of this `LLMChoiceStreaming` instance.
    Parameters:
      `finishReason` - Reason for stopping the model

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `LLMChoiceStreaming`.
    Returns:
      The set of properties names

  - ### getCustomField

    @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
    Deprecated.
    Use `toMap()` instead.
    Get the value of an unrecognizable property of this `LLMChoiceStreaming` instance.
    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

    @Nonnull public Map<String,Object> toMap()
    Get the value of all properties of this `LLMChoiceStreaming` instance including unrecognized properties.
    Returns:
      The map of all properties

  - ### setCustomField

    public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
    Set an unrecognizable property of this `LLMChoiceStreaming` instance. 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 property
      `customFieldValue` - The value of the property

  - ### equals

    public boolean equals(@Nullable Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    @Nonnull public String toString()
    Overrides:
      `toString` in class `Object`

  - ### create

    public static LLMChoiceStreaming.Builder create()
    Create a type-safe, fluent-api builder object to construct a new `LLMChoiceStreaming` instance with all required arguments.