-
Notifications
You must be signed in to change notification settings - Fork 25.5k
[ES|QL] Enable the TEXT_EMBEDDING function in non-snapshot build #136103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
f294ca5
5f10061
25acbf1
791f036
ee2b64a
e958a11
2ad6801
c3df8c7
7349c88
6803a51
142da36
78e22c3
409be1f
9c3db76
ea202ba
01f3021
ce9580a
679d120
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 136103 | ||
summary: Enable the TEXT_EMBEDDING function in non-snapshot build | ||
area: ES|QL | ||
type: feature | ||
issues: [] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,7 +20,6 @@ | |||||
import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; | ||||||
import org.elasticsearch.xpack.esql.expression.function.Param; | ||||||
|
||||||
import java.io.IOException; | ||||||
import java.util.List; | ||||||
import java.util.Objects; | ||||||
|
||||||
|
@@ -40,14 +39,24 @@ public class TextEmbedding extends InferenceFunction<TextEmbedding> { | |||||
|
||||||
@FunctionInfo( | ||||||
returnType = "dense_vector", | ||||||
description = "Generates dense vector embeddings for text using a specified inference endpoint.", | ||||||
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.DEVELOPMENT) }, | ||||||
description = "Generates dense vector embeddings from a text using a specified inference endpoint.", | ||||||
afoucret marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
appliesTo = { @FunctionAppliesTo(version = "9.3", lifeCycle = FunctionAppliesToLifecycle.PREVIEW) }, | ||||||
preview = true, | ||||||
examples = { | ||||||
@Example( | ||||||
description = "Generate text embeddings using the 'test_dense_inference' inference endpoint.", | ||||||
file = "text-embedding", | ||||||
tag = "embedding-eval" | ||||||
tag = "text-embedding-eval" | ||||||
), | ||||||
@Example( | ||||||
description = "Generate text embeddings for use within a KNN search.", | ||||||
file = "text-embedding", | ||||||
tag = "text-embedding-knn" | ||||||
), | ||||||
@Example( | ||||||
description = "Generate text embeddings inline within a KNN search.", | ||||||
file = "text-embedding", | ||||||
tag = "text-embedding-knn-inline" | ||||||
) } | ||||||
) | ||||||
public TextEmbedding( | ||||||
|
@@ -56,7 +65,7 @@ public TextEmbedding( | |||||
@Param( | ||||||
name = InferenceFunction.INFERENCE_ID_PARAMETER_NAME, | ||||||
type = { "keyword" }, | ||||||
description = "Identifier of the inference endpoint" | ||||||
description = "Identifier of the inference endpoint. The inference endpoint must have the `text_embedding` task type." | ||||||
afoucret marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
) Expression inferenceId | ||||||
) { | ||||||
super(source, List.of(inputText, inferenceId)); | ||||||
|
@@ -65,7 +74,7 @@ public TextEmbedding( | |||||
} | ||||||
|
||||||
@Override | ||||||
public void writeTo(StreamOutput out) throws IOException { | ||||||
public void writeTo(StreamOutput out) { | ||||||
|
public void writeTo(StreamOutput out) { | |
public void writeTo(StreamOutput out) throws java.io.IOException { |
Copilot uses AI. Check for mistakes.
Uh oh!
There was an error while loading. Please reload this page.