-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprompts.py
72 lines (49 loc) · 1.54 KB
/
prompts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# prompts.py
# Prompt for file analysis
ANALYZE_CODE_PROMPT = """
You are tasked with analyzing a Python project file to extract concise and actionable information.
For the given file, generate the following output:
1. **Purpose**: Provide a single sentence summarizing the purpose of the code in the file.
2. **Key Features**: List the main functionalities implemented, described concisely in bullet points.
3. **Dependencies**: Identify external libraries or frameworks used in this file. Ignore standard Python libraries.
File content:
{code_content}
"""
# Prompt for project explanation
EXPLAIN_PROJECT_PROMPT = """
Based on the following file summaries, explain the entire project. Include:
- A clear explanation of the project's purpose.
- How the different files interact with each other.
- The overall structure and flow of the project.
{combined_summary}
"""
# Prompt for README.md structuring
README_TEMPLATE = """
# Project Documentation
## Overview
{project_summary}
## Features
{features}
## Installation
To install the dependencies for this project, run:
```bash
pip install -r requirements.txt
```
## How to Use
1. Navigate to the project directory:
```bash
git clone <github-download-link>
cd <project-directory>
```
2. Ensure all dependencies are installed.
3. Run the main script:
```bash
python {main_script_name}
```
## Dependencies
The project uses the following dependencies (found in `requirements.txt`):
{requirements}
## File Descriptions
Below is a brief description of the key Python files in this project:
{file_descriptions}
"""