-
Notifications
You must be signed in to change notification settings - Fork 64
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
Initial commit for RAG in py-ml #427
base: main
Are you sure you want to change the base?
Conversation
DCO is missing |
43e01d3
to
db78131
Compare
opensearch_py_ml/ml_commons/rag_pipeline/rag/opensearch_class.py
Outdated
Show resolved
Hide resolved
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.
really cool stuff here! 📖 🤖 💬 Lets try and refactor some code so its reusable across classes also lets apply SRP so that a class isnt burdened by doing a lot at once.
Make sure to add documentation to files and methods.
Also Im seeing there exists a query python file within py-ml https://github.com/opensearch-project/opensearch-py-ml/blame/main/opensearch_py_ml/query.py if possible maybe we can aggregate to existing code?
Lastly lets come up with a great description of the feature. You put a lot of effort so lets make it visually appealing in the PR description (diagrams, how to use, gifs, concise summary; emojis) You can use this as influence opensearch-project/neural-search#933 talk to @dhrubo-os if maybe we want to open up a Issue and then link this PR not sure if thats too much.
Great work!
self.aws_region = config.get('region') | ||
self.index_name = config.get('index_name') |
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.
Is there input validation involved? maybe we can catch this earlier so it doesn't have to be a headache later?
opensearch_py_ml/ml_commons/rag_pipeline/rag/opensearch_class.py
Outdated
Show resolved
Hide resolved
DCO is missing. |
ced6a59
to
3260f3a
Compare
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
…ffering a suggested default value with the flexibility for users to enter a custom value if needed. Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
…ctor fields, like name etc, updated knn index details and chunking details Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
opensearch_py_ml/ml_commons/rag_pipeline/rag/AIConnectorHelper.py
Outdated
Show resolved
Hide resolved
opensearch_py_ml/ml_commons/rag_pipeline/rag/AIConnectorHelper.py
Outdated
Show resolved
Hide resolved
Removed references to serverless. Now the code only supports managed and open-source service types. Removed the menu option for serverless. For search methods, removed “neural” and only use “semantic” search. Added a prompt to choose between semantic search with LLM and semantic search without LLM. If semantic with LLM is chosen and the service type is managed, the code will prompt for LLM configuration. If open-source is chosen, we skip AWS/Bedrock configurations and do not prompt for LLM registration since that requires AWS Bedrock. Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
…tsHelper Signed-off-by: hmumtazz <[email protected]>
… creating a connector Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
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.
Lets put a new line on the following files thats probably why its not able to pick up the license header
No license header found in:
- opensearch_py_ml/ml_commons/rag_pipeline/init.py
- opensearch_py_ml/ml_commons/rag_pipeline/rag/init.py
- opensearch_py_ml/ml_commons/rag_pipeline/rag/rag.py
- opensearch_py_ml/ml_commons/rag_pipeline/rag/ml_models/init.py
…ues. Signed-off-by: hmumtazz <[email protected]>
@hmumtazz lint is still failing:
|
Integ tests are failing too!! Please fix these two |
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
Signed-off-by: hmumtazz <[email protected]>
…isting methods Signed-off-by: hmumtazz <[email protected]>
Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Check List
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.