Skip to content

Commit 9609c1c

Browse files
committed
Initial Commit - v1.0
1 parent 91d230c commit 9609c1c

File tree

4 files changed

+831
-0
lines changed

4 files changed

+831
-0
lines changed

README.md

+61
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,63 @@
11
# leetcode-summerizer
22
Summarize and collect into a DB a collection of LeetCode problems (Description, Solutions, Code, Analysis)
3+
4+
## 📣 News
5+
6+
- My new e-book "LLMs Intro and System Design (2023 Edition)" covering the foundations of LLMs as well as System Design and Latest Updates in generative AI technology will appear soon [planned by Christmas 🎄]. Stay tuned!
7+
8+
# 🚀 AI-Powered LeetCode Problem Summarizer
9+
10+
This project harnesses the power of OpenAI's GPT models to summarize LeetCode problems, making interview preparation more efficient and engaging. Whether you're gearing up for a big interview or just brushing up on your coding skills, this tool is your go-to assistant!
11+
12+
## 🌟 Features
13+
14+
- Summarizes LeetCode problems using OpenAI's GPT models.
15+
- Efficient batch processing of problems.
16+
- Easy-to-use command-line interface.
17+
- Outputs stored neatly in CSV format.
18+
19+
## 📚 Setup Instructions
20+
21+
1. **Get OpenAI API Access:**
22+
- You'll need access to OpenAI's API. Check out [OpenAI's Platform](https://openai.com/api/) for subscription details and how to obtain API credits.
23+
24+
2. **Clone the Repository:**
25+
- `git clone https://github.com/your-username/leetcode-summarizer.git`
26+
- Navigate to the repository directory: `cd leetcode-summarizer`
27+
28+
3. **Install Required Python Packages:**
29+
- Make sure you have Python installed on your system.
30+
- Install necessary packages: `pip install requests pandas`
31+
32+
4. **Set Up Your API Key:**
33+
- Store your OpenAI API key as an environment variable for security.
34+
- In your terminal, set the API key: `export OPENAI_API_KEY='your_api_key_here'`
35+
36+
5. **Running the Application:**
37+
- Run the main script: `python main.py`
38+
- Make sure you have your problem inputs ready in `prompt_arguments.csv`.
39+
40+
### Open AI Platform Issues
41+
42+
#### ChatGPT API Setup Challenges
43+
- **New API endpoint updates:**
44+
- The current endpoint used in this code is "https://api.openai.com/v1/chat/completions".
45+
- This endpoint is one of the options for both "gpt-3.5-turbo" (default in this code) and "gpt-4" models.
46+
- Each endpoint supports only a certain class of models.
47+
- Explore the latest "endpoints" and their compatible models in [Open AI's platform documentation](https://platform.openai.com/docs/models/model-endpoint-compatibility).
48+
- **New format for request message (currently ChatML format).**
49+
- **You have to upgrade to a paid account and add credits to your account:**
50+
- There’s a known bug with the payment system. You may get the "Error 429 Too Many Requests" from Open AI Api while adding your payment method. You may need to install a VPN (as I did as the last solution) to get around this issue [Link: https://techviral.net/chatgpt-error-429-too-many-requests/], or wait for it to be resolved, hopefully soon.
51+
- **You need to re-generate your Open AI key after upgrading the billing account and store the new API key in your bash_profile for use in the python code. Otherwise, you will get the error "404 Client Error: Not Found for url: https://api.openai.com/v1/completions".**
52+
53+
## 💻 Recommended Code Editor
54+
55+
- Suggestion is using [Visual Studio Code](https://code.visualstudio.com/) for an enhanced coding experience with this project.
56+
57+
## 🎶 A Fun Fact
58+
59+
- This README and the accompanying code were crafted while listening to some energetic techno beats! Techno is love ❤️. Check out some of my DJ mixes (Organic House, and Melodic House and Techno) [here on Soundcloud](https://soundcloud.com/alireza_deer)!
60+
61+
## 🙌 Credits
62+
63+
- This project was created with assistance from my ChatGPT assistant, who was indispensable in writing the code and crafting this README.

0 commit comments

Comments
 (0)