This project generates personalized study plans for students using LangChain and OpenAI's GPT-4 model.
-
Clone the repository:
git clone https://github.com/fisa712/cogentlabs.git cd cogentlabs
-
Create a virtual environment:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
Create a .env
file in the root directory of the project and add your OpenAI API key:
To run the notebook and generate a study plan:
-
Open the Jupyter notebook:
jupyter notebook UntitledCogent.ipynb
-
Run all cells in the notebook:
- Follow the instructions in the notebook to input student information.
- The notebook will generate a personalized study plan based on the provided information.
-
Load Dependencies: Ensure all required libraries are imported.
-
Set Up Environment Variables: Load your API key from the
.env
file. -
Initialize Model: Set up the OpenAI model with your API key.
-
Define Prompt Template: Create a prompt template for generating the study plan.
-
Generate Study Plan: Invoke the chain to generate a study plan.
- using runnables created summary of the book use langchain lcel runnables to get the summary of documents.
- utilizing reportlab to generate a pdf document
Use
reportlab
to create a PDF of the generated plan.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.