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.KernelContent;

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

    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,
        String modelId,
        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