This project is a Chainlit application designed to facilitate interactions with a custom language model for question answering and document retrieval.
-
src/: Contains the main application code.
- main.py: Entry point of the application.
- llm/: Contains custom language model implementations and prompt templates.
- custom_llm.py: Defines the
CustomLLMclass for API interactions. - prompt_templates.py: Manages prompt templates for generating queries.
- custom_llm.py: Defines the
- document_processing/: Handles document loading and chunking.
- chunking.py: Functions for chunking documents.
- loader.py: Loads documents from various sources.
- vectorstore/: Contains functions for generating embeddings.
- embeddings.py: Functions for creating text embeddings.
- chains/: Implements the logic for question answering and retrieval.
- qa_chain.py: Integrates language model and document retrieval.
- retrieval.py: Functions for retrieving relevant documents.
- utils/: Utility functions for various tasks.
- helpers.py: Includes logging and data formatting functions.
-
config/: Configuration settings for the application.
- settings.py: Contains API keys and environment variables.
-
data/: Documentation about the data used in the application.
- README.md: Information on data formats and sources.
-
vectorstores/: Documentation about vector stores.
- README.md: Setup and usage instructions for vector stores.
-
requirements.txt: Lists dependencies required for the project.
-
chainlit.md: Documentation specific to the Chainlit framework.
-
.env: Stores environment variables for sensitive information.
-
Clone the repository:
git clone <repository-url> cd chainlit-app -
Install the required dependencies:
pip install -r requirements.txt -
Set up environment variables in the
.envfile. -
Run the application:
chainlit run main.py
Once the application is running, you can interact with the language model through the Chainlit interface. Submit your queries, and the model will provide responses based on the loaded documents and embeddings.
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure that your code adheres to the project's coding standards and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.