https://github.com/showpune/windup-prompt
https://github.com/showpune/windup-prompt
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/showpune/windup-prompt
- Owner: showpune
- Created: 2023-05-08T02:58:04.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:47:00.000Z (over 2 years ago)
- Last Synced: 2025-01-24T10:47:10.635Z (over 1 year ago)
- Language: Python
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# windup-prompt: generate the windup rules by open AI
## Introduce
Three way to use OpenAI to generate windup rules
1) By chat with system prompt
2) A sequence of asks to get more context, make the result more precise
3) Use sematical kernal to make the ask plan to generate the rule
## Installation
1. Configration the connection to open AI
```
cp .env-sample .env
```
Config the connection string to azure open ai service, to create the azure open ai service and get the configuration, check [link](https://github.com/showpune/windup-prompt/blob/master/how-to.md))
Install the requirements
```
python -m pip install -r requirements.txt
```
## Simple: Generate the rules directly
Run the code
```
python simple-main.py
```
Use the [system prompt](https://github.com/showpune/windup-prompt/blob/master/prompt/system.txt) and [user prompt](https://github.com/showpune/windup-prompt/blob/master/prompt/chat/ask.txt) to generate the windup rules, input any platform you want to migration:

## Chat Sequence
* Since the Open AI can't get all the context in one ask to generate the rules, you can use a sequence chat to get more information, like the service partern, API pattern and special concept, and then use the information as assist prompt to generate the rule
* You can find the sequence of chat from [Chat Sequence](https://github.com/showpune/windup-prompt/tree/master/prompt/windup).
* The chat will asked by the sequence of the folder name, we need the sequence since some ask is dependent. Like we have the special concept of a platform, then we can ask the API pattern
Test the sequence ask by
```
python pipe-main.py
```
The result looks like



## Semantical Kernal: Generate the rule by auto-gpt
There are more ask
1) Should I care about the sequence in [Chat Sequence](https://github.com/showpune/windup-prompt/tree/master/prompt/windup)?
2) Is there any more skills shared by others I can use to generate the windup rules?
3) Is the skills I defined make sense?
Let sematical kernal to handle it: It will read all the skills from [Chat Sequence](https://github.com/showpune/windup-prompt/tree/master/prompt/windup), merge with system skills and make a plan to generate the windup rules
```
python pipe-main.py
```
