All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.semantickernel.services.textcompletion.StreamingTextContent Maven / Gradle / Ivy

There is a newer version: 1.3.0
Show newest version
// Copyright (c) Microsoft. All rights reserved.
package com.microsoft.semantickernel.services.textcompletion;

import com.microsoft.semantickernel.services.StreamingKernelContent;
import javax.annotation.Nullable;

/**
 * StreamingTextContent is a wrapper for TextContent that allows for streaming.
 */
public class StreamingTextContent extends StreamingKernelContent {

    /**
     * Initializes a new instance of the {@code StreamingTextContent} class with a provided text
     * content.
     *
     * @param content The text content.
     */
    public StreamingTextContent(TextContent content) {
        super(content, 0, null, null);
    }

    @Override
    @Nullable
    public String getContent() {
        TextContent content = getInnerContent();
        if (content == null) {
            return null;
        }
        return content.getContent();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy