-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[ML] Custom service add support for input_type, top_n, and return_documents #129441
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
base: main
Are you sure you want to change the base?
[ML] Custom service add support for input_type, top_n, and return_documents #129441
Conversation
Pinging @elastic/ml-core (Team:ML) |
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can value be null?
value.getClass().getSimpleName() | |
value == null ? "null" : value.getClass().getSimpleName() |
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this
entity.toXContent(builder, null); | ||
String xContentResult = Strings.toString(builder); | ||
|
||
var expected = XContentHelper.stripWhitespace(""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL
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)