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

Refactor database connection and update documentation #1

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

Conversation

NikhilSehgal123
Copy link
Owner

@NikhilSehgal123 NikhilSehgal123 commented May 24, 2024

Refactors the codebase to enhance security, flexibility, and robustness, and updates documentation for better setup guidance.

  • Abstracts Database Connection: Introduces a new db_connection.py file that abstracts the database connection logic using environment variables, reducing repetition and enhancing security.
  • Improves Error Handling: Implements try-except blocks in vector_database.py for better error handling around database operations, increasing the robustness of the code.
  • Updates Environment Configuration: Modifies vector_database.py to utilize environment variables for database connection parameters, removing hard-coded values.
  • Enhances Documentation: Updates the README.md file with detailed instructions on setting up environment variables for database connection and enabling the pgvector extension in Azure PostgreSQL.
  • Increases Flexibility in Usage: Modifies usage.py to dynamically retrieve vector dimensions from an environment variable, allowing for more flexible vector operations.

For more details, open the Copilot Workspace session.

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.

None yet

1 participant