StreamingTextContent<T> Class

Type Parameters

T

The type of the content.

Implements

public abstract class StreamingTextContent<T>
extends KernelContentImpl<T>
implements StreamingKernelContent<T>

Base class which represents the content returned by a streaming AI service.

Constructor Summary

Modifier Constructor Description
protected StreamingTextContent(T innerContent, int choiceIndex, String modelId, Map<String,ContextVariable<?>> metadata)

Initializes a new instance of the StreamingTextContent<T> class.

Method Summary

Modifier and Type Method and Description
int getChoiceIndex()

Gets the zero-based index of the choice in the streaming sequence.

Methods inherited from KernelContentImpl

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

StreamingTextContent

protected StreamingTextContent(T innerContent, int choiceIndex, String modelId, Map> metadata)

Initializes a new instance of the StreamingTextContent<T> class.

Parameters:

innerContent - The inner content representation.
choiceIndex - The zero-based index of the choice in the streaming sequence.
modelId - The model identifier used to generate the content.
metadata - The metadata associated with the content.

Method Details

getChoiceIndex

public int getChoiceIndex()

Gets the zero-based index of the choice in the streaming sequence.

Returns:

The zero-based index of the choice in the streaming sequence.

Applies to