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

com.microsoft.semantickernel.services.textcompletion.TextContent 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.orchestration.FunctionResultMetadata;
import com.microsoft.semantickernel.services.KernelContentImpl;
import javax.annotation.Nullable;

/**
 * Content from a text completion service.
 */
public class TextContent extends KernelContentImpl {

    private final String content;

    /**
     * Initializes a new instance of the {@code TextContent} class with a provided content, model
     * ID, and metadata.
     *
     * @param content  The content.
     * @param modelId  The model ID.
     * @param metadata The metadata.
     */
    public TextContent(
        String content,
        @Nullable String modelId,
        @Nullable FunctionResultMetadata metadata) {
        super(content, modelId, metadata);
        this.content = content;
    }

    /**
     * Gets the content.
     *
     * @return The content.
     */
    public String getValue() {
        return content;
    }

    @Override
    public String getContent() {
        return content;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy