-
Notifications
You must be signed in to change notification settings - Fork 138
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
Fix: Gracefully handle error when generative_qa_parameters is not provided #3100
Fix: Gracefully handle error when generative_qa_parameters is not provided #3100
Conversation
…vided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
@@ -126,6 +126,11 @@ public void processResponseAsync( | |||
} | |||
|
|||
GenerativeQAParameters params = GenerativeQAParamUtil.getGenerativeQAParameters(request); | |||
if (params == null) { | |||
throw new IllegalArgumentException( | |||
"generative_qa_parameters not found. Please provide ext.generative_qa_parameters to proceed." |
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.
May be we can refer to this link: https://opensearch.org/docs/latest/search-plugins/conversational-search/#step-6-use-the-pipeline-for-rag
so that customer knows which values to provide in this parameter?
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.
makes sense, added
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.
Adding an unit test to cover this case would makes the change more substantial.
DCO is failing. |
Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
e30acd1
to
290f89d
Compare
fixed |
Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
…vided (#3100) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e)
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.12 2.12
# Navigate to the new working tree
cd .worktrees/backport-2.12
# Create a new branch
git switch --create backport/backport-3100-to-2.12
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0f7481e3fba9833548074660fc79b69aef3ce527
# Push it to GitHub
git push --set-upstream origin backport/backport-3100-to-2.12
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.12 Then, create a pull request where the |
…vided (#3100) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e)
…vided (#3100) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e)
…vided (#3100) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e)
…vided (#3100) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e)
…vided (#3100) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e)
…vided (#3100) (#3111) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e) Co-authored-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
…vided (opensearch-project#3100) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
…vided (#3100) (#3106) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e) Co-authored-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
…vided (#3100) (#3107) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e) Co-authored-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
…vided (#3100) (#3110) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e) Co-authored-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
…vided (#3100) (#3109) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e) Co-authored-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
…vided (#3100) (#3108) * fix: gracefully handle error when generative_qa_parameters is not provided Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * fix: spotless apply Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * docs: adding documentation link to error message Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> * tests: adding UT to test null params Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> --------- Signed-off-by: Pavan Yekbote <mail2pavanyekbote@gmail.com> (cherry picked from commit 0f7481e) Co-authored-by: Pavan Yekbote <mail2pavanyekbote@gmail.com>
Description
Gracefully handles error when required parameter is not provided for a rag pipeline.
Introduced in 2.10, we can backport till there if required. Please suggest.
Related Issues
Resolves #3092
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.