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

ai.vespa.llm.LanguageModel Maven / Gradle / Ivy

// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.llm;

import ai.vespa.llm.completion.Completion;
import ai.vespa.llm.completion.Prompt;
import com.yahoo.api.annotations.Beta;

import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;

/**
 * Interface to language models.
 *
 * @author bratseth
 */
@Beta
public interface LanguageModel {

    List complete(Prompt prompt, InferenceParameters options);

    CompletableFuture completeAsync(Prompt prompt,
                                                             InferenceParameters options,
                                                             Consumer consumer);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy