Skip to content
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

Integration of MongoDB for feedbacks - Revised #107

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Kannav02
Copy link
Collaborator

This PR aims to fix a small part of the issue #75

The objective of this PR can be tracked via the following points

  • Correcting the requirements to now include pyMongo
  • Integrating MongoDB as the database to which the feedback will go back
  • referencing different contexts based on their IDs to the main table is the feedback table

To view/test these changes, follow the following steps

  • run the frontend with the mock server
  • specify the MONGO_DB_URI to which the feedback and the context would be fed back to
  • enter a prompt
  • submit a feedback
  • now access the MongoDB instance and you will see the data there, including the timestamp of submissions

This is what I got when I ran this twice

Screenshot 2024-11-25 at 9 49 49 PM
Screenshot 2024-11-25 at 9 50 04 PM

Follow-up question, are there limited number of contexts that we have right now for this application, if yes , I might optimize the database insertions rather not to insert the pre-existing contexts, but to reference them and insert their ids into the main table

Thank you!

Signed-off-by: Kannav02 <kannavsethi02@gmail.com>
- schema corrected for the database
- parameters included in the main submit_feedback function
- insertion corrected to utilise the correct datetime.now() function

Signed-off-by: Kannav02 <kannavsethi02@gmail.com>
@Kannav02
Copy link
Collaborator Author

@luarss , even now I believe there is some problem with the CI pipeline, what should we do for the same?

@Kannav02 Kannav02 requested a review from luarss November 27, 2024 01:55
@luarss
Copy link
Collaborator

luarss commented Nov 27, 2024

Follow-up question, are there limited number of contexts that we have right now for this application, if yes , I might optimize the database insertions rather not to insert the pre-existing contexts, but to reference them and insert their ids into the main table

Do you mean to reference them as context IDs? Where would we see the mapping between context ID and their contents?

frontend/Dockerfile Outdated Show resolved Hide resolved
@Kannav02
Copy link
Collaborator Author

Follow-up question, are there limited number of contexts that we have right now for this application, if yes , I might optimize the database insertions rather not to insert the pre-existing contexts, but to reference them and insert their ids into the main table

Do you mean to reference them as context IDs? Where would we see the mapping between context ID and their contents?

so my idea is ,I have a main table for all the information and then a table for context, within that table I am abstracting all the details related to context, so you can reference the context details using the context ID assigned to it, my assumption was there are a limited number of context right now, so it shouldn't be a problem , but I just wanted to clarify this with you

Signed-off-by: Kannav02 <kannavsethi02@gmail.com>
- added the function to now submit feedback back to mongoDB
- corrected the sys path to now include common as a package, workaround , kind of like a pseudopackage

Signed-off-by: Kannav02 <kannavsethi02@gmail.com>
Signed-off-by: Kannav02 <kannavsethi02@gmail.com>
Signed-off-by: Kannav02 <kannavsethi02@gmail.com>
Signed-off-by: Kannav02 <kannavsethi02@gmail.com>
@luarss
Copy link
Collaborator

luarss commented Dec 18, 2024

Hello, sorry for the delayed response. Can you please send me your e-mail at jluar@precisioninno.com so we can further discuss about this offline?

@Kannav02
Copy link
Collaborator Author

Sure, i'll send an email about this

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants