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

Fix and Improve PDF RAG Streamlit UI: Error Handling, Model Management, and Vector DB Updates #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shreeramdrao
Copy link

Summary:

  • Fixed various issues in the PDF RAG Streamlit UI application.
  • Improved error handling when uploading PDFs and interacting with the vector database.
  • Enhanced logging to provide better insights into the process.
  • Optimized model handling, ensuring only valid models are used.
  • Added a zoom slider for better interaction with PDF images.
  • Cleaned up session state variables when deleting the vector database.

Key Changes:

  • Refactored the create_vector_db function to improve PDF processing and chunk splitting.
  • Updated the process_question function for better model interaction and response formatting.
  • Added logic to handle missing or invalid models and user inputs more gracefully.

This update improves the overall functionality and user experience of the application.

@shreeramdrao
Copy link
Author

Summary:

  • Fixed errors related to vector DB creation and model name extraction.
  • Resolved issues where the model names were not being extracted properly from the response.
  • Ensured proper handling of missing 'name' keys in model information.

Changes Made:

  • Corrected how models are processed and extracted by checking for both 'name' and fallback options ('model', 'parent_model').
  • Improved error handling to ensure the code does not crash when encountering missing fields in the response.
  • Enhanced logging for better debugging and traceability.

How to Test:

  • Upload a PDF file and check if the vector DB is created properly.
  • Select a model from the dropdown and ensure the question is processed successfully.
  • Test the system with both valid and invalid PDF files to verify error handling.

Additional Notes:

  • The code has been thoroughly tested, and logging has been improved to assist in future debugging.
  • I believe this addresses the issue mentioned in [issue number] (if applicable).

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