Skip to content

Improve documentation and error handling in VectorStore embeddings module #41

@Adityanagraj

Description

@Adityanagraj

The src/core/embeddings.py module provides vector embeddings and database functionality using LangChain and Chroma. While the code has basic logging and exception handling, the following areas could be improved:

  1. Documentation:

    • Docstrings for methods, especially for parameters and return values.
    • Usage examples for the VectorStore class.
    • Clarify expected input types, e.g., documents: List.
  2. Error Handling:

    • Add more informative error messages.
    • Consider custom exception classes for database operations.
  3. Type Annotations:

    • Specify types for documents parameter (e.g., List[Document]) if possible.
  4. Testing:

    • Unit tests for create_vector_db and delete_collection methods.
    • Test for edge cases (empty documents, invalid model name, etc.).

Please provide the following details to help refine this issue:

  • Are there specific use cases or bugs you've encountered?
  • Should the issue target documentation, code improvements, or both?
  • Any preferred format or style for docstrings and error messages?
  • Do you have examples of typical documents input?
  • Should this include writing new tests, or just improvements to current code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions