Package ai.vespa.llm.clients
Class OpenAI
java.lang.Object
ai.vespa.llm.clients.ConfigurableLanguageModel
ai.vespa.llm.clients.OpenAI
- All Implemented Interfaces:
ai.vespa.llm.LanguageModel
A configurable OpenAI client.
- Author:
- lesters
-
Constructor Summary
ConstructorDescriptionOpenAI
(LlmClientConfig config, com.yahoo.container.jdisc.secretstore.SecretStore secretStore) -
Method Summary
Modifier and TypeMethodDescriptionList<ai.vespa.llm.completion.Completion>
complete
(ai.vespa.llm.completion.Prompt prompt, ai.vespa.llm.InferenceParameters parameters) CompletableFuture<ai.vespa.llm.completion.Completion.FinishReason>
completeAsync
(ai.vespa.llm.completion.Prompt prompt, ai.vespa.llm.InferenceParameters parameters, Consumer<ai.vespa.llm.completion.Completion> consumer) Methods inherited from class ai.vespa.llm.clients.ConfigurableLanguageModel
getApiKey, getEndpoint, setApiKey, setEndpoint
-
Constructor Details
-
OpenAI
@Inject public OpenAI(LlmClientConfig config, com.yahoo.container.jdisc.secretstore.SecretStore secretStore)
-
-
Method Details
-
complete
public List<ai.vespa.llm.completion.Completion> complete(ai.vespa.llm.completion.Prompt prompt, ai.vespa.llm.InferenceParameters parameters) -
completeAsync
public CompletableFuture<ai.vespa.llm.completion.Completion.FinishReason> completeAsync(ai.vespa.llm.completion.Prompt prompt, ai.vespa.llm.InferenceParameters parameters, Consumer<ai.vespa.llm.completion.Completion> consumer)
-