pfy 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pfy-0.1.0/LICENSE +21 -0
- pfy-0.1.0/MANIFEST.in +5 -0
- pfy-0.1.0/PKG-INFO +140 -0
- pfy-0.1.0/README.md +122 -0
- pfy-0.1.0/docs/PUBLISHING.md +50 -0
- pfy-0.1.0/pfy.egg-info/PKG-INFO +140 -0
- pfy-0.1.0/pfy.egg-info/SOURCES.txt +37 -0
- pfy-0.1.0/pfy.egg-info/dependency_links.txt +1 -0
- pfy-0.1.0/pfy.egg-info/entry_points.txt +2 -0
- pfy-0.1.0/pfy.egg-info/requires.txt +9 -0
- pfy-0.1.0/pfy.egg-info/top_level.txt +1 -0
- pfy-0.1.0/promptify/__init__.py +4 -0
- pfy-0.1.0/promptify/agent/__init__.py +0 -0
- pfy-0.1.0/promptify/agent/graph.py +25 -0
- pfy-0.1.0/promptify/agent/node.py +170 -0
- pfy-0.1.0/promptify/agent/state.py +10 -0
- pfy-0.1.0/promptify/cli.py +229 -0
- pfy-0.1.0/promptify/cli_supports/ConfigTUI.py +137 -0
- pfy-0.1.0/promptify/cli_supports/PromptifyTUI.py +88 -0
- pfy-0.1.0/promptify/cli_supports/__init__.py +0 -0
- pfy-0.1.0/promptify/core/__init__.py +0 -0
- pfy-0.1.0/promptify/core/formatter.py +53 -0
- pfy-0.1.0/promptify/core/providerSelection/__init__.py +0 -0
- pfy-0.1.0/promptify/core/providerSelection/config.py +90 -0
- pfy-0.1.0/promptify/core/providerSelection/providers.py +116 -0
- pfy-0.1.0/promptify/core/service.py +44 -0
- pfy-0.1.0/promptify/core/validator.py +54 -0
- pfy-0.1.0/promptify/main.py +37 -0
- pfy-0.1.0/promptify/modelConfig.py +11 -0
- pfy-0.1.0/promptify/prompt/CriticAgentPrompt.py +36 -0
- pfy-0.1.0/promptify/prompt/TriageAgentPrompt.py +10 -0
- pfy-0.1.0/promptify/prompt/__init__.py +0 -0
- pfy-0.1.0/promptify/prompt/expertAgentPrompt.py +22 -0
- pfy-0.1.0/promptify/prompt/promptSmith.py +19 -0
- pfy-0.1.0/promptify/utils/__init__.py +0 -0
- pfy-0.1.0/promptify/utils/errors.py +105 -0
- pfy-0.1.0/pyproject.toml +28 -0
- pfy-0.1.0/setup.cfg +4 -0
- pfy-0.1.0/test/testModelConnection.py +11 -0
pfy-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Siva Netizen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
pfy-0.1.0/MANIFEST.in
ADDED
pfy-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pfy
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: dotenv>=0.9.9
|
|
9
|
+
Requires-Dist: langchain>=1.1.0
|
|
10
|
+
Requires-Dist: langchain-google-genai>=3.2.0
|
|
11
|
+
Requires-Dist: litellm>=1.80.5
|
|
12
|
+
Requires-Dist: pyfiglet>=1.0.4
|
|
13
|
+
Requires-Dist: pyperclip>=1.11.0
|
|
14
|
+
Requires-Dist: rich>=14.2.0
|
|
15
|
+
Requires-Dist: textual>=6.7.1
|
|
16
|
+
Requires-Dist: typer>=0.20.0
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# Promptify
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
> **Transform vague ideas into professional engineering specifications using AI agents.**
|
|
25
|
+
|
|
26
|
+
[](https://www.python.org/downloads/)
|
|
27
|
+
[](https://opensource.org/licenses/MIT)
|
|
28
|
+
[](https://github.com/psf/black)
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Introduction
|
|
33
|
+
|
|
34
|
+
**Promptify** is an advanced AI-powered CLI tool designed to bridge the gap between abstract user intent and concrete technical requirements. It employs a multi-agent architecture (Triage, Critic, Expert, and Prompt Smith) to iteratively refine, critique, and enhance your prompts, delivering production-ready specifications for software projects.
|
|
35
|
+
|
|
36
|
+
No more back-and-forth. Just **Promptify** and build.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
* ** Multi-Agent Architecture**:
|
|
41
|
+
* **Triage Agent**: Understands intent and routes to the right expert.
|
|
42
|
+
* **Critic Agent**: Identifies gaps, ambiguities, and missing context.
|
|
43
|
+
* **Expert Agent**: Provides domain-specific architectural advice.
|
|
44
|
+
* **Prompt Smith**: Synthesizes everything into a perfect final prompt.
|
|
45
|
+
* ** Dynamic Model Support**: Switch seamlessly between **Cerebras** (fast/free), **OpenAI** (GPT-4), **Anthropic** (Claude 3.5), or **Local LLMs**.
|
|
46
|
+
* ** Interactive CLI & TUI**: Beautiful terminal user interface built with `Textual` and `Rich`.
|
|
47
|
+
* ** Flexible Configuration**: Easy YAML-based configuration with environment variable support (`.env`).
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
1. **Clone the repository**
|
|
52
|
+
```bash
|
|
53
|
+
git clone https://github.com/yourusername/promptify.git
|
|
54
|
+
cd promptify
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
2. **Install dependencies**
|
|
58
|
+
```bash
|
|
59
|
+
pip install .
|
|
60
|
+
# Or manually
|
|
61
|
+
pip install -r requirements.txt
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
3. **Set up Environment**
|
|
65
|
+
Create a `.env` file in the root directory:
|
|
66
|
+
```bash
|
|
67
|
+
# For default (Cerebras)
|
|
68
|
+
CEREBRAS_API_KEY=your_key_here
|
|
69
|
+
|
|
70
|
+
# Optional
|
|
71
|
+
OPENAI_API_KEY=sk-...
|
|
72
|
+
ANTHROPIC_API_KEY=sk-...
|
|
73
|
+
GOOGLE_GENAI_API_KEY=...
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
### Quick Start
|
|
79
|
+
Run the interactive mode:
|
|
80
|
+
```bash
|
|
81
|
+
python cli.py refine "Build a flappy bird game in python"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Command Line
|
|
85
|
+
Refine a prompt directly and save to file:
|
|
86
|
+
```bash
|
|
87
|
+
python cli.py refine "Create a CRM system for real estate" --output specs.md --format rich
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Configuration
|
|
91
|
+
Manage your LLM provider settings easily:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# View current config
|
|
95
|
+
python cli.py config --show
|
|
96
|
+
|
|
97
|
+
# Switch to OpenAI GPT-4
|
|
98
|
+
python cli.py config --provider openai --model gpt-4
|
|
99
|
+
|
|
100
|
+
# Switch to free Cerebras tier
|
|
101
|
+
python cli.py config --provider cerebras --model cerebras/llama3.1-8b
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Architecture
|
|
105
|
+
|
|
106
|
+
```mermaid
|
|
107
|
+
graph TD
|
|
108
|
+
User[User Input] --> T[Triage Agent]
|
|
109
|
+
T --> C[Critic Agent]
|
|
110
|
+
C --> E[Expert Agent]
|
|
111
|
+
E --> S[Prompt Smith]
|
|
112
|
+
S --> Final[Refined Artifact]
|
|
113
|
+
|
|
114
|
+
subgraph Core
|
|
115
|
+
Provider[Model Provider]
|
|
116
|
+
Config[Configuration]
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
T -.-> Provider
|
|
120
|
+
C -.-> Provider
|
|
121
|
+
E -.-> Provider
|
|
122
|
+
S -.-> Provider
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Contributing
|
|
126
|
+
|
|
127
|
+
Contributions are welcome! Please examine the `agent/` directory for core logic and `core/providerSelection/` for model integration.
|
|
128
|
+
|
|
129
|
+
1. Fork the Project
|
|
130
|
+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
|
|
131
|
+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
|
132
|
+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
|
133
|
+
5. Open a Pull Request
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
*Built with ❤️ by the Promptify Team*
|
pfy-0.1.0/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
|
|
2
|
+
# Promptify
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
> **Transform vague ideas into professional engineering specifications using AI agents.**
|
|
7
|
+
|
|
8
|
+
[](https://www.python.org/downloads/)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
[](https://github.com/psf/black)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Introduction
|
|
15
|
+
|
|
16
|
+
**Promptify** is an advanced AI-powered CLI tool designed to bridge the gap between abstract user intent and concrete technical requirements. It employs a multi-agent architecture (Triage, Critic, Expert, and Prompt Smith) to iteratively refine, critique, and enhance your prompts, delivering production-ready specifications for software projects.
|
|
17
|
+
|
|
18
|
+
No more back-and-forth. Just **Promptify** and build.
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
* ** Multi-Agent Architecture**:
|
|
23
|
+
* **Triage Agent**: Understands intent and routes to the right expert.
|
|
24
|
+
* **Critic Agent**: Identifies gaps, ambiguities, and missing context.
|
|
25
|
+
* **Expert Agent**: Provides domain-specific architectural advice.
|
|
26
|
+
* **Prompt Smith**: Synthesizes everything into a perfect final prompt.
|
|
27
|
+
* ** Dynamic Model Support**: Switch seamlessly between **Cerebras** (fast/free), **OpenAI** (GPT-4), **Anthropic** (Claude 3.5), or **Local LLMs**.
|
|
28
|
+
* ** Interactive CLI & TUI**: Beautiful terminal user interface built with `Textual` and `Rich`.
|
|
29
|
+
* ** Flexible Configuration**: Easy YAML-based configuration with environment variable support (`.env`).
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
1. **Clone the repository**
|
|
34
|
+
```bash
|
|
35
|
+
git clone https://github.com/yourusername/promptify.git
|
|
36
|
+
cd promptify
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. **Install dependencies**
|
|
40
|
+
```bash
|
|
41
|
+
pip install .
|
|
42
|
+
# Or manually
|
|
43
|
+
pip install -r requirements.txt
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
3. **Set up Environment**
|
|
47
|
+
Create a `.env` file in the root directory:
|
|
48
|
+
```bash
|
|
49
|
+
# For default (Cerebras)
|
|
50
|
+
CEREBRAS_API_KEY=your_key_here
|
|
51
|
+
|
|
52
|
+
# Optional
|
|
53
|
+
OPENAI_API_KEY=sk-...
|
|
54
|
+
ANTHROPIC_API_KEY=sk-...
|
|
55
|
+
GOOGLE_GENAI_API_KEY=...
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Usage
|
|
59
|
+
|
|
60
|
+
### Quick Start
|
|
61
|
+
Run the interactive mode:
|
|
62
|
+
```bash
|
|
63
|
+
python cli.py refine "Build a flappy bird game in python"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Command Line
|
|
67
|
+
Refine a prompt directly and save to file:
|
|
68
|
+
```bash
|
|
69
|
+
python cli.py refine "Create a CRM system for real estate" --output specs.md --format rich
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Configuration
|
|
73
|
+
Manage your LLM provider settings easily:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# View current config
|
|
77
|
+
python cli.py config --show
|
|
78
|
+
|
|
79
|
+
# Switch to OpenAI GPT-4
|
|
80
|
+
python cli.py config --provider openai --model gpt-4
|
|
81
|
+
|
|
82
|
+
# Switch to free Cerebras tier
|
|
83
|
+
python cli.py config --provider cerebras --model cerebras/llama3.1-8b
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Architecture
|
|
87
|
+
|
|
88
|
+
```mermaid
|
|
89
|
+
graph TD
|
|
90
|
+
User[User Input] --> T[Triage Agent]
|
|
91
|
+
T --> C[Critic Agent]
|
|
92
|
+
C --> E[Expert Agent]
|
|
93
|
+
E --> S[Prompt Smith]
|
|
94
|
+
S --> Final[Refined Artifact]
|
|
95
|
+
|
|
96
|
+
subgraph Core
|
|
97
|
+
Provider[Model Provider]
|
|
98
|
+
Config[Configuration]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
T -.-> Provider
|
|
102
|
+
C -.-> Provider
|
|
103
|
+
E -.-> Provider
|
|
104
|
+
S -.-> Provider
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Contributing
|
|
108
|
+
|
|
109
|
+
Contributions are welcome! Please examine the `agent/` directory for core logic and `core/providerSelection/` for model integration.
|
|
110
|
+
|
|
111
|
+
1. Fork the Project
|
|
112
|
+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
|
|
113
|
+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
|
114
|
+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
|
115
|
+
5. Open a Pull Request
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
*Built with ❤️ by the Promptify Team*
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# How to Publish Promptify
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
* **PyPI Account**: Register at [pypi.org](https://pypi.org/).
|
|
5
|
+
* **Build Tools**: Install `build` and `twine`.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install build twine
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 1. Build the Package
|
|
12
|
+
Generate the distribution files (source archive and wheel) in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Clean previous builds
|
|
16
|
+
rm -rf dist/
|
|
17
|
+
|
|
18
|
+
# Build
|
|
19
|
+
python -m build
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. Test Locally
|
|
23
|
+
Unzip and check the build, or install it locally.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install dist/promptify-0.1.0-py3-none-any.whl
|
|
27
|
+
```
|
|
28
|
+
Run `promptify --help` to verify.
|
|
29
|
+
|
|
30
|
+
## 3. Publish to PyPI
|
|
31
|
+
Upload the package to the Python Package Index.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python -m twine upload dist/*
|
|
35
|
+
```
|
|
36
|
+
You will be prompted for your API token (username: `__token__`).
|
|
37
|
+
|
|
38
|
+
## 4. Install from PyPI
|
|
39
|
+
Once published, anyone can install it via:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install promptify
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Development Install (Editable)
|
|
46
|
+
For local development where changes are reflected immediately:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install -e .
|
|
50
|
+
```
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pfy
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: dotenv>=0.9.9
|
|
9
|
+
Requires-Dist: langchain>=1.1.0
|
|
10
|
+
Requires-Dist: langchain-google-genai>=3.2.0
|
|
11
|
+
Requires-Dist: litellm>=1.80.5
|
|
12
|
+
Requires-Dist: pyfiglet>=1.0.4
|
|
13
|
+
Requires-Dist: pyperclip>=1.11.0
|
|
14
|
+
Requires-Dist: rich>=14.2.0
|
|
15
|
+
Requires-Dist: textual>=6.7.1
|
|
16
|
+
Requires-Dist: typer>=0.20.0
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# Promptify
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
> **Transform vague ideas into professional engineering specifications using AI agents.**
|
|
25
|
+
|
|
26
|
+
[](https://www.python.org/downloads/)
|
|
27
|
+
[](https://opensource.org/licenses/MIT)
|
|
28
|
+
[](https://github.com/psf/black)
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Introduction
|
|
33
|
+
|
|
34
|
+
**Promptify** is an advanced AI-powered CLI tool designed to bridge the gap between abstract user intent and concrete technical requirements. It employs a multi-agent architecture (Triage, Critic, Expert, and Prompt Smith) to iteratively refine, critique, and enhance your prompts, delivering production-ready specifications for software projects.
|
|
35
|
+
|
|
36
|
+
No more back-and-forth. Just **Promptify** and build.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
* ** Multi-Agent Architecture**:
|
|
41
|
+
* **Triage Agent**: Understands intent and routes to the right expert.
|
|
42
|
+
* **Critic Agent**: Identifies gaps, ambiguities, and missing context.
|
|
43
|
+
* **Expert Agent**: Provides domain-specific architectural advice.
|
|
44
|
+
* **Prompt Smith**: Synthesizes everything into a perfect final prompt.
|
|
45
|
+
* ** Dynamic Model Support**: Switch seamlessly between **Cerebras** (fast/free), **OpenAI** (GPT-4), **Anthropic** (Claude 3.5), or **Local LLMs**.
|
|
46
|
+
* ** Interactive CLI & TUI**: Beautiful terminal user interface built with `Textual` and `Rich`.
|
|
47
|
+
* ** Flexible Configuration**: Easy YAML-based configuration with environment variable support (`.env`).
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
1. **Clone the repository**
|
|
52
|
+
```bash
|
|
53
|
+
git clone https://github.com/yourusername/promptify.git
|
|
54
|
+
cd promptify
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
2. **Install dependencies**
|
|
58
|
+
```bash
|
|
59
|
+
pip install .
|
|
60
|
+
# Or manually
|
|
61
|
+
pip install -r requirements.txt
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
3. **Set up Environment**
|
|
65
|
+
Create a `.env` file in the root directory:
|
|
66
|
+
```bash
|
|
67
|
+
# For default (Cerebras)
|
|
68
|
+
CEREBRAS_API_KEY=your_key_here
|
|
69
|
+
|
|
70
|
+
# Optional
|
|
71
|
+
OPENAI_API_KEY=sk-...
|
|
72
|
+
ANTHROPIC_API_KEY=sk-...
|
|
73
|
+
GOOGLE_GENAI_API_KEY=...
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
### Quick Start
|
|
79
|
+
Run the interactive mode:
|
|
80
|
+
```bash
|
|
81
|
+
python cli.py refine "Build a flappy bird game in python"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Command Line
|
|
85
|
+
Refine a prompt directly and save to file:
|
|
86
|
+
```bash
|
|
87
|
+
python cli.py refine "Create a CRM system for real estate" --output specs.md --format rich
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Configuration
|
|
91
|
+
Manage your LLM provider settings easily:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# View current config
|
|
95
|
+
python cli.py config --show
|
|
96
|
+
|
|
97
|
+
# Switch to OpenAI GPT-4
|
|
98
|
+
python cli.py config --provider openai --model gpt-4
|
|
99
|
+
|
|
100
|
+
# Switch to free Cerebras tier
|
|
101
|
+
python cli.py config --provider cerebras --model cerebras/llama3.1-8b
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Architecture
|
|
105
|
+
|
|
106
|
+
```mermaid
|
|
107
|
+
graph TD
|
|
108
|
+
User[User Input] --> T[Triage Agent]
|
|
109
|
+
T --> C[Critic Agent]
|
|
110
|
+
C --> E[Expert Agent]
|
|
111
|
+
E --> S[Prompt Smith]
|
|
112
|
+
S --> Final[Refined Artifact]
|
|
113
|
+
|
|
114
|
+
subgraph Core
|
|
115
|
+
Provider[Model Provider]
|
|
116
|
+
Config[Configuration]
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
T -.-> Provider
|
|
120
|
+
C -.-> Provider
|
|
121
|
+
E -.-> Provider
|
|
122
|
+
S -.-> Provider
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Contributing
|
|
126
|
+
|
|
127
|
+
Contributions are welcome! Please examine the `agent/` directory for core logic and `core/providerSelection/` for model integration.
|
|
128
|
+
|
|
129
|
+
1. Fork the Project
|
|
130
|
+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
|
|
131
|
+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
|
132
|
+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
|
133
|
+
5. Open a Pull Request
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
*Built with ❤️ by the Promptify Team*
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
docs/PUBLISHING.md
|
|
6
|
+
pfy.egg-info/PKG-INFO
|
|
7
|
+
pfy.egg-info/SOURCES.txt
|
|
8
|
+
pfy.egg-info/dependency_links.txt
|
|
9
|
+
pfy.egg-info/entry_points.txt
|
|
10
|
+
pfy.egg-info/requires.txt
|
|
11
|
+
pfy.egg-info/top_level.txt
|
|
12
|
+
promptify/__init__.py
|
|
13
|
+
promptify/cli.py
|
|
14
|
+
promptify/main.py
|
|
15
|
+
promptify/modelConfig.py
|
|
16
|
+
promptify/agent/__init__.py
|
|
17
|
+
promptify/agent/graph.py
|
|
18
|
+
promptify/agent/node.py
|
|
19
|
+
promptify/agent/state.py
|
|
20
|
+
promptify/cli_supports/ConfigTUI.py
|
|
21
|
+
promptify/cli_supports/PromptifyTUI.py
|
|
22
|
+
promptify/cli_supports/__init__.py
|
|
23
|
+
promptify/core/__init__.py
|
|
24
|
+
promptify/core/formatter.py
|
|
25
|
+
promptify/core/service.py
|
|
26
|
+
promptify/core/validator.py
|
|
27
|
+
promptify/core/providerSelection/__init__.py
|
|
28
|
+
promptify/core/providerSelection/config.py
|
|
29
|
+
promptify/core/providerSelection/providers.py
|
|
30
|
+
promptify/prompt/CriticAgentPrompt.py
|
|
31
|
+
promptify/prompt/TriageAgentPrompt.py
|
|
32
|
+
promptify/prompt/__init__.py
|
|
33
|
+
promptify/prompt/expertAgentPrompt.py
|
|
34
|
+
promptify/prompt/promptSmith.py
|
|
35
|
+
promptify/utils/__init__.py
|
|
36
|
+
promptify/utils/errors.py
|
|
37
|
+
test/testModelConnection.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
promptify
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from langgraph.graph import StateGraph, START, END
|
|
2
|
+
from .state import AgentState
|
|
3
|
+
from .node import triageAgent, criticAgent, expertAgent, promptSmith
|
|
4
|
+
|
|
5
|
+
def create_promptify_graph():
|
|
6
|
+
"""Builds and compiles the Promptify agent graph"""
|
|
7
|
+
graph = StateGraph(AgentState)
|
|
8
|
+
|
|
9
|
+
# Add nodes
|
|
10
|
+
graph.add_node("triage", triageAgent)
|
|
11
|
+
graph.add_node("critic", criticAgent)
|
|
12
|
+
graph.add_node("expert", expertAgent)
|
|
13
|
+
graph.add_node("smith", promptSmith)
|
|
14
|
+
|
|
15
|
+
# Define flow
|
|
16
|
+
graph.add_edge(START, "triage")
|
|
17
|
+
graph.add_edge("triage", "critic")
|
|
18
|
+
graph.add_edge("critic", "expert")
|
|
19
|
+
graph.add_edge("expert", "smith")
|
|
20
|
+
graph.add_edge("smith", END)
|
|
21
|
+
|
|
22
|
+
return graph.compile()
|
|
23
|
+
|
|
24
|
+
# Export compiled graph
|
|
25
|
+
promptify = create_promptify_graph()
|