[ML] Custom service add support for input_type, top_n, and return_documents#129441
Merged
jonathan-buttner merged 17 commits intoelastic:mainfrom Jun 20, 2025
Merged
[ML] Custom service add support for input_type, top_n, and return_documents#129441jonathan-buttner merged 17 commits intoelastic:mainfrom
jonathan-buttner merged 17 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
davidkyle
approved these changes
Jun 19, 2025
| Strings.format( | ||
| "Input type translation value for key [%s] must be a String that is not null and not empty, received: [%s].", | ||
| key, | ||
| value.getClass().getSimpleName() |
Member
There was a problem hiding this comment.
Can value be null?
Suggested change
| value.getClass().getSimpleName() | |
| value == null ? "null" : value.getClass().getSimpleName() |
Contributor
Author
There was a problem hiding this comment.
Oops, thank you.
| Strings.format( | ||
| "Invalid input type translation for key: [%s], is not a valid value. Must be one of %s", | ||
| key, | ||
| EnumSet.of(InputType.CLASSIFICATION, InputType.CLUSTERING, InputType.INGEST, InputType.SEARCH) |
Member
There was a problem hiding this comment.
Suggested change
| EnumSet.of(InputType.CLASSIFICATION, InputType.CLUSTERING, InputType.INGEST, InputType.SEARCH) | |
| SUPPORTED_REQUEST_VALUES |
| * @param inputTypeTranslation the map of input type translations to validate | ||
| * @param validationException a ValidationException to which errors will be added | ||
| */ | ||
| public static Map<InputType, String> validateInputTypeTranslationValues( |
| entity.toXContent(builder, null); | ||
| String xContentResult = Strings.toString(builder); | ||
|
|
||
| var expected = XContentHelper.stripWhitespace(""" |
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jun 23, 2025
…uments (#129441) (#129860) * Making progress on different request parameters * Working tests * Adding custom service validator for rerank * Fixing embedding bug * Adding transport version check * Fixing tests * Fixing license header * Fixing writeTo * Moving file and removing commented code * Fixing test * Fixing tests * Refactoring and tests * Fixing test (cherry picked from commit d9b34d4) # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
kderusso
pushed a commit
to kderusso/elasticsearch
that referenced
this pull request
Jun 23, 2025
…uments (elastic#129441) * Making progress on different request parameters * Working tests * Adding custom service validator for rerank * Fixing embedding bug * Adding transport version check * Fixing tests * Fixing license header * Fixing writeTo * Moving file and removing commented code * Fixing test * Fixing tests * Refactoring and tests * Fixing test
mridula-s109
pushed a commit
to mridula-s109/elasticsearch
that referenced
this pull request
Jun 25, 2025
…uments (elastic#129441) * Making progress on different request parameters * Working tests * Adding custom service validator for rerank * Fixing embedding bug * Adding transport version check * Fixing tests * Fixing license header * Fixing writeTo * Moving file and removing commented code * Fixing test * Fixing tests * Refactoring and tests * Fixing test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the feedback item from the original PR: #127939
This PR adds support for
input_type,top_n, andreturn_documents.Comments:
#127939 (comment)