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.
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
[Enhancement] Enhance validation for create connector API #3579
base: main
Are you sure you want to change the base?
[Enhancement] Enhance validation for create connector API #3579
Changes from all commits
7df638e
236fda2
953f16e
4e5455c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 we please add java doc with more detailed explanations.
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.
if (isInBuiltProcessFunction(preProcessFunction)) then we can invoke validatePreProcessFunctions?
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.
let's organize the private methods in the order it was being invoked.
getRemoteServerFromURL
and thenvalidatePreProcessFunctions
. Its easy to read for reviewers.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.
a bit confused with the latest change, so now the only validation is if the preProcessFunction contains "openai" as opposed to "connector.post_process.default.embedding"? so this in theory a more lenient validation?
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.
Yes, I did that change based on your previous comment - "thinking if for these constants we can create the string using the INBUILT_FUNC_PREFIX? and maybe even have preprocessprefix and postprocessprefix? this can avoid any accidental changes "
I can see only that's the only(eg: openai, bedrock, cohere) unique text in the function names which we can defer for different llm services.
Or you meant something differently ? Creating different constant arrays for each llm service post and pre Process Functions ? So in this case we will have 8 arrays, 4 (openai, bedrock, cohere, sagemaker) for pre process functions and 4 for post process functions ?
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.
I believe there has been a confusion: #3579 (comment)
In this comment, I meant that we should create the constants as such:
MLPostProcessFunction.OPENAI_EMBEDDING = INBUILT_FUNC_PREFIX + "openai.embedding" + ACTION_POST_PROCESS_FUNCTION*
*just an example may not be fully code accurate
This way if either of these constants change, we don't have to change the code. With respect to whether the check should be lenient or not we can wait on more comments.