diff options
author | Jon Bratseth <bratseth@vespa.ai> | 2023-04-20 13:35:07 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@vespa.ai> | 2023-04-20 13:35:07 +0200 |
commit | 29771cba3c234cf6f1661ce80d6038eebdb7892a (patch) | |
tree | 77a3be449ad5601296c6cc52bbbafe3bdff3c6ae /model-integration | |
parent | f88bd3be35b35140a98dc3ba888e615d1dd5baa6 (diff) |
Export API
Diffstat (limited to 'model-integration')
4 files changed, 218 insertions, 1 deletions
diff --git a/model-integration/abi-spec.json b/model-integration/abi-spec.json index 6f31cf5a2e6..0c76ba38660 100644 --- a/model-integration/abi-spec.json +++ b/model-integration/abi-spec.json @@ -1 +1,185 @@ -{ }
\ No newline at end of file +{ + "ai.vespa.llm.Completion$FinishReason" : { + "superClass" : "java.lang.Enum", + "interfaces" : [ ], + "attributes" : [ + "public", + "final", + "enum" + ], + "methods" : [ + "public static ai.vespa.llm.Completion$FinishReason[] values()", + "public static ai.vespa.llm.Completion$FinishReason valueOf(java.lang.String)" + ], + "fields" : [ + "public static final enum ai.vespa.llm.Completion$FinishReason length", + "public static final enum ai.vespa.llm.Completion$FinishReason stop" + ] + }, + "ai.vespa.llm.Completion" : { + "superClass" : "java.lang.Record", + "interfaces" : [ ], + "attributes" : [ + "public", + "final", + "record" + ], + "methods" : [ + "public void <init>(java.lang.String, ai.vespa.llm.Completion$FinishReason)", + "public java.lang.String text()", + "public ai.vespa.llm.Completion$FinishReason finishReason()", + "public static ai.vespa.llm.Completion from(java.lang.String)", + "public final java.lang.String toString()", + "public final int hashCode()", + "public final boolean equals(java.lang.Object)" + ], + "fields" : [ ] + }, + "ai.vespa.llm.Generator" : { + "superClass" : "com.yahoo.component.AbstractComponent", + "interfaces" : [ ], + "attributes" : [ + "public" + ], + "methods" : [ + "public void <init>(ai.vespa.modelintegration.evaluator.OnnxRuntime, com.yahoo.llm.GeneratorConfig)", + "public java.lang.String generate(java.lang.String, ai.vespa.llm.GeneratorOptions)", + "public java.lang.String generate(java.lang.String)", + "public void deconstruct()" + ], + "fields" : [ ] + }, + "ai.vespa.llm.GeneratorOptions$SearchMethod" : { + "superClass" : "java.lang.Enum", + "interfaces" : [ ], + "attributes" : [ + "public", + "final", + "enum" + ], + "methods" : [ + "public static ai.vespa.llm.GeneratorOptions$SearchMethod[] values()", + "public static ai.vespa.llm.GeneratorOptions$SearchMethod valueOf(java.lang.String)" + ], + "fields" : [ + "public static final enum ai.vespa.llm.GeneratorOptions$SearchMethod GREEDY", + "public static final enum ai.vespa.llm.GeneratorOptions$SearchMethod CONTRASTIVE", + "public static final enum ai.vespa.llm.GeneratorOptions$SearchMethod BEAM", + "public static final enum ai.vespa.llm.GeneratorOptions$SearchMethod SAMPLE" + ] + }, + "ai.vespa.llm.GeneratorOptions" : { + "superClass" : "java.lang.Object", + "interfaces" : [ ], + "attributes" : [ + "public" + ], + "methods" : [ + "public void <init>()", + "public ai.vespa.llm.GeneratorOptions$SearchMethod getSearchMethod()", + "public ai.vespa.llm.GeneratorOptions setSearchMethod(ai.vespa.llm.GeneratorOptions$SearchMethod)", + "public int getMaxLength()", + "public ai.vespa.llm.GeneratorOptions setMaxLength(int)" + ], + "fields" : [ ] + }, + "ai.vespa.llm.LanguageModel" : { + "superClass" : "java.lang.Object", + "interfaces" : [ ], + "attributes" : [ + "public", + "interface", + "abstract" + ], + "methods" : [ + "public abstract java.util.List complete(ai.vespa.llm.Prompt)" + ], + "fields" : [ ] + }, + "ai.vespa.llm.Prompt" : { + "superClass" : "java.lang.Object", + "interfaces" : [ ], + "attributes" : [ + "public", + "abstract" + ], + "methods" : [ + "public void <init>()", + "public abstract java.lang.String asString()", + "public ai.vespa.llm.Prompt append(ai.vespa.llm.Completion)", + "public abstract ai.vespa.llm.Prompt append(java.lang.String)" + ], + "fields" : [ ] + }, + "ai.vespa.llm.StringPrompt" : { + "superClass" : "ai.vespa.llm.Prompt", + "interfaces" : [ ], + "attributes" : [ + "public" + ], + "methods" : [ + "public java.lang.String asString()", + "public ai.vespa.llm.StringPrompt append(java.lang.String)", + "public ai.vespa.llm.StringPrompt append(ai.vespa.llm.Completion)", + "public java.lang.String toString()", + "public static ai.vespa.llm.StringPrompt from(java.lang.String)", + "public bridge synthetic ai.vespa.llm.Prompt append(java.lang.String)", + "public bridge synthetic ai.vespa.llm.Prompt append(ai.vespa.llm.Completion)" + ], + "fields" : [ ] + }, + "ai.vespa.llm.client.OpenAiClient$Builder" : { + "superClass" : "java.lang.Object", + "interfaces" : [ ], + "attributes" : [ + "public" + ], + "methods" : [ + "public void <init>(java.lang.String)", + "public ai.vespa.llm.client.OpenAiClient$Builder model(java.lang.String)", + "public ai.vespa.llm.client.OpenAiClient$Builder echo(boolean)", + "public ai.vespa.llm.client.OpenAiClient build()" + ], + "fields" : [ ] + }, + "ai.vespa.llm.client.OpenAiClient" : { + "superClass" : "java.lang.Object", + "interfaces" : [ + "ai.vespa.llm.LanguageModel" + ], + "attributes" : [ + "public" + ], + "methods" : [ + "public java.util.List complete(ai.vespa.llm.Prompt)" + ], + "fields" : [ ] + }, + "ai.vespa.llm.test.MockLanguageModel$Builder" : { + "superClass" : "java.lang.Object", + "interfaces" : [ ], + "attributes" : [ + "public" + ], + "methods" : [ + "public ai.vespa.llm.test.MockLanguageModel$Builder completer(java.util.function.Function)", + "public void <init>()", + "public ai.vespa.llm.test.MockLanguageModel build()" + ], + "fields" : [ ] + }, + "ai.vespa.llm.test.MockLanguageModel" : { + "superClass" : "java.lang.Object", + "interfaces" : [ + "ai.vespa.llm.LanguageModel" + ], + "attributes" : [ + "public" + ], + "methods" : [ + "public void <init>(ai.vespa.llm.test.MockLanguageModel$Builder)", + "public java.util.List complete(ai.vespa.llm.Prompt)" + ], + "fields" : [ ] + } +}
\ No newline at end of file diff --git a/model-integration/src/main/java/ai/vespa/llm/client/package-info.java b/model-integration/src/main/java/ai/vespa/llm/client/package-info.java new file mode 100644 index 00000000000..c95f87eec3c --- /dev/null +++ b/model-integration/src/main/java/ai/vespa/llm/client/package-info.java @@ -0,0 +1,11 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +@ExportPackage +@PublicApi +package ai.vespa.llm.client; + +import com.yahoo.api.annotations.PublicApi; +import com.yahoo.osgi.annotation.ExportPackage; + +/** + * Clients to externally hosted large language models. + */
\ No newline at end of file diff --git a/model-integration/src/main/java/ai/vespa/llm/package-info.java b/model-integration/src/main/java/ai/vespa/llm/package-info.java new file mode 100644 index 00000000000..04fc24c51ee --- /dev/null +++ b/model-integration/src/main/java/ai/vespa/llm/package-info.java @@ -0,0 +1,11 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +@ExportPackage +@PublicApi +package ai.vespa.llm; + +import com.yahoo.api.annotations.PublicApi; +import com.yahoo.osgi.annotation.ExportPackage; + +/** + * API for working with large language models. + */
\ No newline at end of file diff --git a/model-integration/src/main/java/ai/vespa/llm/test/package-info.java b/model-integration/src/main/java/ai/vespa/llm/test/package-info.java new file mode 100644 index 00000000000..0d51815fd6d --- /dev/null +++ b/model-integration/src/main/java/ai/vespa/llm/test/package-info.java @@ -0,0 +1,11 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +@ExportPackage +@PublicApi +package ai.vespa.llm.test; + +/** + * Tools for writing tests when working with large language models. + */ + +import com.yahoo.api.annotations.PublicApi; +import com.yahoo.osgi.annotation.ExportPackage;
\ No newline at end of file |